MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / alloc

Method alloc

Engine/PluginMemory.cpp:81–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81bool
82PluginMemory::alloc(size_t nBytes)
83{
84 QMutexLocker l(&_imp->mutex);
85
86 if (_imp->locked) {
87 return false;
88 } else {
89 _imp->data.resize(nBytes);
90 EffectInstancePtr e = _imp->effect.lock();
91 if (e) {
92 e->registerPluginMemory( _imp->data.size() );
93 }
94
95 return true;
96 }
97}
98
99void
100PluginMemory::freeMem()

Callers

nothing calls this directly

Calls 4

registerPluginMemoryMethod · 0.80
resizeMethod · 0.45
lockMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected