Re: Problem with NSData
Re: Problem with NSData
- Subject: Re: Problem with NSData
- From: Graham Cox <email@hidden>
- Date: Tue, 6 Apr 2010 10:32:37 +1000
On 06/04/2010, at 1:12 AM, McLaughlin, Michael P. wrote:
> In normal operation, getDataSz takes in a buffer allocated by an STL vector
> in the following call:
>
> [mySubtaskServer getDataSz:&my_vec[0] ofSize:dataSize];
>
> If (just for testing), I replace the argument, data, with a local malloc
> buffer (in getDataSz) and free it before exiting, then I do not see this
> error.
I don't see any allocation (of my_vec) going on here anywhere. Show that code. It seems you're simply supplying the address of a (possibly uninitialized) variable. That will fail in the way you've indicated.
--Graham
_______________________________________________
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