Re: How to lock an object?
Re: How to lock an object?
- Subject: Re: How to lock an object?
- From: Greg Parker <email@hidden>
- Date: Fri, 5 Jun 2009 10:59:47 -0700
On Jun 4, 2009, at 9:03 PM, cocoa learner wrote:
How can I use mlock() for NSString and NSTextField?
As argument to mlock is address of memory area and length.
I have address of memory area but I do not have the length (as these
are objects).
class_getInstanceSize() will tell you how big an instance of NSString
or NSTextField is. But the data you're trying to protect won't
necessarily be inside that range. For example, NSString often uses
another allocation internally to hold the string data, and you have no
way to know where that is.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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