Topic: delete this in non-static member function - ok
Author: Valentin Bonnard <Bonnard.V@wanadoo.fr>
Date: 1999/09/07 Raw View
Gene Bushuyev wrote:
> 1) Firstly, I want to know, how can it be easy to prove that it is safe,
Every one knows that is it safe.
> One can
> always use static or non-member function to delete the object
Oh yes, we should hide the bug deeply so that no proof-reader
notices it. Very deeply. I like this way of thinking.
> or use any of
> the garbage collection mechanisms to do that.
Use a gc just because you are under the impression that
delete this is unsafe ? A gc should be used because
every delete is potentially unsafe (when miused), not
because of delete this.
--
Valentin Bonnard
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Francis Glassborow <francis@robinton.demon.co.uk>
Date: 1999/09/08 Raw View
In article <37D571A2.207C@wanadoo.fr>, Valentin Bonnard
<Bonnard.V@wanadoo.fr> writes
>Use a gc just because you are under the impression that
>delete this is unsafe ? A gc should be used because
>every delete is potentially unsafe (when miused), not
>because of delete this.
I do not understand. GC is about managing dynamic memory, delete is
about managing dynamic objects. They are emphatically not the same
thing.
Francis Glassborow Journal Editor, Association of C & C++ Users
64 Southfield Rd
Oxford OX4 1PA +44(0)1865 246490
All opinions are mine and do not represent those of any organisation
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]