brainiac commented on merge request !2 at RG Creators / Plugins / MQ2NetBots

brainiac
2023-11-05T17:15:21Z

There’s no possible way this is working. By holding a reference to a shared pointer it doesn’t own its scope and so will be deleted as soon as it is created. Did you test this?

This shouldn’t be a reference. Copies of the shared_ptr increment the reference count which means that as long as a copy exists the object is kept alive. By storing a reference the only copy is the original which goes out of scope as soon as the original scope that created it ends