Haha, oops!
It looks like I misread NSDecimalNumber
in the post as NSNumber
. I think NSDecimalNumber
is always a reference so that's OK, though it might be good to add a Swift class too.
I think it probably doesn't make sense to have a test that includes the deallocation. But I'm not sure whether it's better to change the existing benchmark vs add a new one.