Currently, I am setting the argument to be an optional in the store(_ asset:) method but it not deallocating all of the assets. Any help would be appreciated.
func store(_ asset: Asset?) {
asset?.container = self
asset?.changeHandler = { [weak self] (change) in
print("\(String(describing: asset)) has changed value by \(change). New total value: \(String(describing: self?.totalValue))")
}
assets.append(asset!)
}