shared children disappear
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "mixins/LazyLinkMixin.h"
|
||||
#include <iostream>
|
||||
|
||||
class SimpleNode : public LazyLinkMixin<SimpleNode>,
|
||||
public std::enable_shared_from_this<SimpleNode> {
|
||||
@@ -11,6 +12,9 @@ public:
|
||||
return std::make_shared<EnableMakeShared>(std::move(name));
|
||||
}
|
||||
const std::string& name() const override { return name_; }
|
||||
~SimpleNode() {
|
||||
std::cout << "--- Destructor called for: " << name_ << "\n";
|
||||
}
|
||||
protected:
|
||||
std::shared_ptr<SimpleNode> getShared() override {
|
||||
return shared_from_this();
|
||||
|
||||
Reference in New Issue
Block a user