leovandriel / Tosti

An Objective-C interpreter without C support.
BSD 2-Clause "Simplified" License
37 stars 5 forks source link

Memory Management #11

Open gurmeherchawla opened 7 years ago

gurmeherchawla commented 7 years ago

The Interpretation does not seem to be managing the memory of objects. The instances created do not appear to be deallocating.

leovandriel commented 7 years ago

that's probably correct. It's something I haven't looked into much, but you might need to assign nil to force deallocation. Else the global memory dictionary will hold on to every object.

gurmeherchawla commented 7 years ago

I have tried assigning nil to both, the variables being evaluated, and the global memory (the NSMutableDictionary instance variable) in TOMem. That, however, does not solve the issue.

leovandriel commented 7 years ago

i see. objects are indeed not deallocated. i'll need to take a closer look to see why arc isn't cleaning things up.

gurmeherchawla commented 6 years ago

Any luck with the same?

gurmeherchawla commented 6 years ago

The trouble seems to be at performOnTarget:selectorString:arguments:index: in TOEval. The object being instantiated by Tosti, is having being arbitrarily retained.