• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTextView retain count and HICocoaView problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView retain count and HICocoaView problems


  • Subject: NSTextView retain count and HICocoaView problems
  • From: Ryan Joseph <email@hidden>
  • Date: Wed, 14 Jul 2010 10:39:20 -0600

I have an NSTextView I am allocating programmatically then inserting into a HICocoaView for use in a Carbon app. The problem I'm experiencing has 2 points that are probably related.

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.

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.

Is this a bug in NSTextView or is there some special way I need to dispose of the HICocoaView? I did some tests using other Cocoa views like NSScrollView but they returned 1 as the retainCount and sure enough calling release would deallocate the view. Any ideas? Thanks.

Regards,
	Ryan Joseph
	thealchemistguild.org

_______________________________________________

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

  • Follow-Ups:
    • Re: NSTextView retain count and HICocoaView problems
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Navigation controller management
  • Next by Date: Re: Installation of screensaver fails
  • Previous by thread: Navigation controller management
  • Next by thread: Re: NSTextView retain count and HICocoaView problems
  • Index(es):
    • Date
    • Thread