On Thu, 27 May 2004 03:22:32 +0000 (UTC), Francis Glassborow
: flags (indicates vtable contents)
: ptr to destructor
: ptr to appropriate delete for new used to instantiate
Compiler knows mytype has vtable. Generates code which examines vtable of
i_ptr. Sees there is an operator delete in it at . Calls  then 
which calls correct destructor & operator delete.
Since this dynamic calling of operator delete already requires a vtable
(as the standard requires), I still don't see this as a problem.
With respect, and I know of your name from many years ago when you
published an article of mine in ACCU, unless I have missed something your
explanation does not make any sense. As soon as a vtable is available, you
can call any operator delete anywhere at all including one completely
unknown to the current compiland. It just requires an appropriately laid
Indeed, if maximising code efficiency and minimising vtable size were
important, one could annotate the class to indicate if it does or doesn't
need to store a pointer to the appropriate delete to use when newed. Of
course, with the machinery that will be required by the export keyword,
the pre-linker stage could determine that on its own.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:email@example.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.yqcomputer.com/