#include <iostream>
using namespace std;
class Yoba
{
public:
Yoba()
{
}
~Yoba()
{
std::cout << "Destructed: " << this << std::endl;
}
Yoba * method()
{
Yoba * ref = new Yoba();
return ref;
}
void show()
{
std::cout << "123" << std::endl;
}
};
int main() {
// your code goes here
Yoba y;
Yoba * r = y.method();
r->show();
delete r;
r->show();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgWW9iYQp7CnB1YmxpYzoKCVlvYmEoKQoJewoJCQoJfQoJCgl+WW9iYSgpCgl7CgkJc3RkOjpjb3V0IDw8ICJEZXN0cnVjdGVkOiAiIDw8IHRoaXMgPDwgc3RkOjplbmRsOwoJfQoJCglZb2JhICogbWV0aG9kKCkKCXsKCQlZb2JhICogcmVmID0gbmV3IFlvYmEoKTsKCQlyZXR1cm4gcmVmOwoJfQoJCgl2b2lkIHNob3coKQoJewoJCXN0ZDo6Y291dCA8PCAiMTIzIiA8PCBzdGQ6OmVuZGw7Cgl9CgkKfTsKCmludCBtYWluKCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJWW9iYSB5OwoJWW9iYSAqIHIgPSB5Lm1ldGhvZCgpOwoJci0+c2hvdygpOwoJZGVsZXRlIHI7CglyLT5zaG93KCk7CglyZXR1cm4gMDsKfQ==