[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: free instead of destructor
From: Waldo Bastian <bastian () suse ! de>
Date: 2000-02-08 10:52:39
[Download RAW message or body]
On Tue, 08 Feb 2000, Bo Thorsen wrote:
> I would any day argue that it stems from bad design not to be able to
> both allocate an object on the heap and on the stack. But I have not
> followed the discussion about this and therefore I don't know what
> made you all agree that it is all right to impose this restriction.
> Could someone enlighten me?
If you close a main-window, it deletes itself. This is impossible if it
is allocated on the stack.
The first main-window is typically allocated in main(). (Or in
newInstance()) However, the first doesn't need to be the last. For
example: start application (window 1 gets opened),open second window,
close window 1. So it's basically impossbile to make the one who creates
the window responsible for deleting it.
Cheers,
Waldo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic