Mmm the water is really deep in this pool.
This is no mapping.
Objective-C objects which get GCed get dealloc messages, there is no
way to feed that back to Squeak.
When a Smalltalk object gets GCed you should setup a weak relationship
so that on the finalization action you could then send release to the
companion Objective-C object.
I never did this as it is tricky, difficult and nasty when it goes
wrong. Still you might be lucky when you implement it, you'll find
working examples in the image.
Look for use of the autorelease pool in the objective-c bridge.
The event loop runs each time you call the get next primitive, so
making an auto-released object without a pool would cause the object
to be released at an undetermined time.
Zombies are of course released when a unix process, aka os-x
application, ios app terminates. All resources are returned for reuse
by other users.
As an exercise think about the asUTF8String and what happens, welcome
to managed memory allocation.
Oh yes a finalization solution work work fine for this case.
On Sun, May 1, 2011 at 10:38 PM, Sean P. DeNigris <
[hidden email]> wrote:
--
===========================================================================
John M. McIntosh <
[hidden email]>
Corporate Smalltalk Consulting Ltd.
http://www.smalltalkconsulting.com===========================================================================
_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners