• 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
Newbie memory question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie memory question


  • Subject: Newbie memory question
  • From: email@hidden
  • Date: Wed, 9 May 2007 22:08:08 +0200

Hello,

I have some data. I now need a generic pointer to the memory holding
the data, as well as the size of that memory block, in order to pass
the data to a function. How can I do this? I tried this to no avail:

NSData *testData = [NSKeyedUnarchiver unarchiveObjectWithFile:@"/testData"];

void *pointer = malloc(sizeof(testData));
pointer = [testData copy];
UInt32 size = (sizeof(pointer));


Please help.

Thanks.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Newbie memory question
      • From: Nick Zitzmann <email@hidden>
    • Re: Newbie memory question
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: n00b cocoa bindings question
  • Next by Date: Re: Newbie memory question
  • Previous by thread: Re: complex math message problem
  • Next by thread: Re: Newbie memory question
  • Index(es):
    • Date
    • Thread