From: | Aaron Optimizer Digulla |
Date: | 28 Aug 2000 at 09:50:15 |
Subject: | Re: AMIOPEN: Object allocated on stack - init and/or open |
Quoting Jesse McClusky <thought@weblink.org>:
> What objects need _new then open???
> Generally speaking, from what I've seen, the correct procedure is to
> call _new then init to create it, and deinit then _delete to free it.
> HOWEVER, many classes also have two additional tools called
> open and close. Open calls _new, then init, returning the new class
> instance. Close calls deinit, then _delete.
In that case, I'd like to ask why not all classes have open/close (or
do they) ? Since you always have to call _new+init (and always in
that order), I don't see a good reason to separate these two.
I would even suggest to select one name (_new, init, open, create)
and let that do anything necessary to create an object (like
in Java, C++, Python, Perl and anywhere else).
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html