On 7 Oct 2008, at 1:46 am, Joseph Ayers wrote:
ipsamp = [NSNumber numberWithFloat:(float)ippointer[isamp]]; [ipbufaddObject:ipsamp]; idsamp = [NSNumber numberWithFloat:(float)idpointer[isamp]]; [idbufaddObject:idsamp];
Just a final comment. The cast to (float) here is not required. ippointer is already declared as a float* so ippointer[index] returns data of type float as it is. I mention it because while here it's merely redundant and harmless, your first attempt as posted to me off- list has this cast as [NSNumber numberWithFloat:(unsigned long)ippointer[index]]; Where the cast is most definitely not harmless and in fact prevents the code from working. Throwing in casts without understanding why you're doing it is a good way to introduce bugs, so don't do it unless you really have to.
Also, what Nick said about the memory leak. cheers, Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]