[Dev-C++] "delete this" in the class member
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Oleksandr Y. <erm...@ma...> - 2004-01-28 10:05:09
|
Hi all,
Little question about delete operator.
Can i fall into trouble when making a call "delete this" in the
class member function ?
Example:
struct C1
{
func()
{
/* some other calls */
delete this;
}
};
Of course, "delete this" call is the LAST operator in the function.
If there are no pitfalls, then is it compatible with ISO/ANSI C++?
Thank in advance,
Oleksandr mailto:erm...@ma...
|