use smart pointer when creating an object with an instance of the creator
This commit is contained in:
parent
a0060c8fa8
commit
f1ee437f04
6 changed files with 12 additions and 10 deletions
|
@ -14,7 +14,7 @@ namespace gns {
|
|||
* Represent a GNS3 server
|
||||
* Wrapper around the GNS3 API (https://gns3-server.readthedocs.io/en/latest/endpoints.html)
|
||||
*/
|
||||
class GnsServer {
|
||||
class GnsServer : std::enable_shared_from_this<GnsServer> {
|
||||
public:
|
||||
GnsServer(const std::string& host, std::uint16_t port);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue