Re: Re[2]: [Dev-C++] "delete this" in the class member
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Miguel <mra...@iu...> - 2004-01-30 23:49:46
|
On Thu, 2004-01-29 at 14:12, Oleksandr Yermolenko wrote: Hi, > The purpose of using this techinque was to implement > self-deleting of object if there are no references left. > Something like that: Hmmm. I am a bit puzzled. Could you tell which one is this OO library? Who must derive from/delegate on CGObject? Or it is a Policy class, that becomes the template parameter of some other class? > But objects can have also "auto" and "static" memory class. > So, this technique must set restriction to construct objects of > such class only dynamically(using "new"). > So, may be you can use "delete this" if you know exactly what you > are doing. But is this allowed in ISO/ANSI C++ ? > This somehow reminds me of the problem with having a std::vector<std::auto_ptr<Foo> >. Remember that serious STL implementations forbid this. > I don't know. But does valgrind group plan to produce some > *STABLE* release even for linux ? As far as i know it is available > only by CVS. > Well, I use it at home with Gentoo (yeah I know, this is not fair play), and at work we have sort of 'patchwork Debian Sarge' and it works quite well also. To say the least I am truly impressed with both the default valgrind 'skin' and the calltree one ( and the humble KCachegrind program beats Rational Purify crap everywhere, every time). I don't aspire to get KDE programs run smoothly on Cygwin ( I tried it and I find quite boring to wait for widgets to repaint each time a dialog box pops up HIDEing and EXPOSEing whatever it has below :( ), but valgrind used from commandline would be a nice asset to add to Win32 debugging tools. > P.S.: Sorry for my english. Mine is worse :) Miguel. |