• 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
Re: How to lock an object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to lock an object?
      • From: Scott Ribe <email@hidden>
References: 
 >How to lock an object? (From: cocoa learner <email@hidden>)
 >Re: How to lock an object? (From: Greg Parker <email@hidden>)
 >Re: How to lock an object? (From: cocoa learner <email@hidden>)

  • Prev by Date: dragging window when selecting an NSImageView
  • Next by Date: Cocoa Developers in DFW area
  • Previous by thread: Re: How to lock an object?
  • Next by thread: Re: How to lock an object?
  • Index(es):
    • Date
    • Thread