Re: NSTextView retain count and HICocoaView problems
Re: NSTextView retain count and HICocoaView problems
- Subject: Re: NSTextView retain count and HICocoaView problems
- From: Kyle Sluder <email@hidden>
- Date: Thu, 15 Jul 2010 15:25:24 -0700
On Wed, Jul 14, 2010 at 9:39 AM, Ryan Joseph <email@hidden> wrote:
> 1) The retainCount from the newly created NSTextView returns 4 and goes up to 7 after I call HICocoaViewCreate on the NSTextView instance. I tried calling release on the NSTextView and DisposeControl on the HICocoaView but neither actually dispose of the instance because dealloc is never invoked. I suspect this is because of the retain count being what it is.
Do not look at -retainCount. It gives you no useful information. If
you want to make sure you're correctly balancing retains and releases,
use the static analyzer and Instruments.
> 2) I have a Carbon event handler for mouse moved events installed on the application target which after the NSTextView is created stops working, probably because the NSTextView was never really deallocated it's consuming the mouse events.
That's not an accurate description of how the event dispatch works.
--Kyle Sluder
_______________________________________________
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:
This email sent to email@hidden