NSMakePoint and such - what about memory allocation?
NSMakePoint and such - what about memory allocation?
- Subject: NSMakePoint and such - what about memory allocation?
- From: Christoffer Lerno <email@hidden>
- Date: Fri, 21 May 2004 10:17:05 +0800
Having programmed java almost exclusively for many years now, memory
allocation questions in obj-c sometimes leave me a little confused.
If I use NSMakePoint in this manner:
NSPoint a=NSMakePoint(10,10);
Am I not:
a) first creating an empty, static bound, NSPoint.
b) then allocate memory and create yet another NSPoint with the
NSMakePoint command.
The static NSPoint will disappear when it runs out of scope, but what
about the point created with NSMakePoint, isn't that one dynamically
created and as such needs to be explicitly deallocated? I don't really
see any code actually deallocating these kinds of structs though, so
I'm suspecting I don't need to, but if so - why?
/C
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.