Re: Passing Objects In Messages
Re: Passing Objects In Messages
- Subject: Re: Passing Objects In Messages
- From: Seaside <email@hidden>
- Date: Sat, 18 Oct 2003 03:28:33 +0200
Obj-C does not supply some fully automatic garbage collection, like
Java.
You can allocate object, which I would call permanent and temporary:
- Permanent object are allocated by your application and you have to
dispose
of them later on by your application.
- Temporary objects will be disposed, once the application reached the
next time
the main event loop. This means: Your application is driven by events
generated by OS X and sent
to your application. You process the event and finally return from the
event handling method.
Once returned, the temporary object is released.
Have a look at:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
and read the book
cocoa programming, SAMS publishing (very good)
Am Samstag, 18.10.03 um 02:58 Uhr schrieb James Masasaki:
When I pass an object as a parameter in an Objective-C message,
how/when do I know it's safe to dispose of this object? Is it a
requirement that I receive a response before I dispose the object, or
do I just send the message and some garbage collection mechanism
cleans up the object for me?
Thanks,
James
_______________________________________________
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.
_______________________________________________
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.