July 01, 2005
Unsmart Pointers, Part I
Listing 1
void SomeFunction(SomeObject*);
void CodeSnippet() {
SomeObject* p = new SomeObject();
try {
SomeFunction(p);
}
catch(...) { }
delete p; // is this valid? insufficient information!
}
|
|
||||||||||||||||||||||||||||
|
|
|
|