3 ms·
What about SomeComplexObject b = new SomeComplexObject() This should probably be SomeComplexObject* b = new SomeComplexObject() since the former news up
by Todd 17y ago
What about
SomeComplexObject b = new SomeComplexObject()
This should probably be
SomeComplexObject* b = new SomeComplexObject()
since the former news up an object and then invokes a copy constructor before losing the original reference and leaking.