My question is simply, will this lead to memory leaks with any otherwise perfect class) or does the compiler know when the newly created variable (created with new but returned as a reference (not a pointer)) will go out of scope? Thanks a lot - Joakim.
#include <iostream>
class Foo
{
public...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.