Fix a ref-count loop in Paticles manager
This commit is contained in:
parent
631fa62495
commit
b79f03c96c
@ -512,6 +512,14 @@ void Particles::setupStaticColorComponent(float r1, float g1, float b1, float a1
|
||||
staticColorComponents[7] = a2;
|
||||
}
|
||||
|
||||
ParticlesGlobalManager::~ParticlesGlobalManager()
|
||||
{
|
||||
// break a ref-counting cycle
|
||||
if (d->_commonRoot) {
|
||||
d->_commonRoot->removeUpdateCallback(d.get());
|
||||
}
|
||||
}
|
||||
|
||||
void ParticlesGlobalManager::setWindVector(const osg::Vec3& wind)
|
||||
{
|
||||
std::lock_guard<std::mutex> g(d->_lock);
|
||||
|
@ -150,7 +150,7 @@ protected:
|
||||
class ParticlesGlobalManager
|
||||
{
|
||||
public:
|
||||
~ParticlesGlobalManager() = default;
|
||||
~ParticlesGlobalManager();
|
||||
|
||||
static ParticlesGlobalManager* instance();
|
||||
static void clear();
|
||||
|
Loading…
Reference in New Issue
Block a user