Browse Source
creating new shared_ptr instances from a raw pointer (i.e. shared_ptr<>(this) or alike) destroys the internal reference counting. To make this work, one can use std::enable_shared_from_this(), which solves our problem here.main
2 changed files with 8 additions and 2 deletions
Loading…
Reference in new issue