discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C equivalent of a destructor?


From: Sašo Kiselkov
Subject: Re: Objective-C equivalent of a destructor?
Date: Thu, 06 Oct 2005 07:59:29 +0200
User-agent: Internet Messaging Program (IMP) 3.2.5

Quoting Stefan Urbanek <stefan@agentfarms.net>:

>
> On 5.10.2005, at 22:33, Andrew Pinski wrote:
>
> >
> > On Oct 5, 2005, at 4:31 PM, percy tiglao wrote:
> >
> >
> >> Basically, I know init does the initialization code (and new is
> >> basically alloc and then init)
> >>
> >> But is there any "cleanup" code? Specifically, I'd like to still use
> >> retain-release but still have a destructor. Is there any method that
> >> release calls when the reference count reaches 0 ?
> >>
> >
> > destroy.
> >
>
> I think it should be -dealloc
>
> Stefan Urbanek
> --
> http://stefan.agentfarms.net
>
> First they ignore you, then they laugh at you, then they fight you,
> then you win.
> - Mahatma Gandhi
>

It absolutely is -(void)dealloc; See
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSObject.html#//apple_ref/doc/uid/20000050-dealloc

--
Saso






reply via email to

[Prev in Thread] Current Thread [Next in Thread]