Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFMessagePort and GC



On Mon, Dec 1, 2008 at 12:19 AM, Ryan Brown <email@hidden> wrote:
> Also, forgot to mention: calling either objc_collect_if_needed() or
> [[NSGarbageCollector defaultCollector] collectExhaustively] after releasing
> the run loop source and message port doesn't force an immediate
> deallocation. Not sure why.

Most likely because the object is still referenced on the stack, and
so is still considered live. If you're sure that you've eliminated all
stack references to it (returned from any functions that may have used
it), then you can clear the stack using the objc_clear_stack()
function. Check the docs or list archives for more information on
that.

Mike
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.