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

Method newMemoryInstance

Engine/OfxHost.cpp:1170–1182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1168}
1169
1170OFX::Host::Memory::Instance*
1171OfxHost::newMemoryInstance(size_t nBytes)
1172{
1173 OfxMemory* ret = new OfxMemory( OfxEffectInstancePtr() );
1174 bool allocated = ret->alloc(nBytes);
1175
1176 if ( ( (nBytes != 0) && !ret->getPtr() ) || !allocated ) {
1177 Dialogs::errorDialog( tr("Out of memory").toStdString(),
1178 tr("Failed to allocate memory (%1).").arg( printAsRAM(nBytes) ).toStdString() );
1179 }
1180
1181 return ret;
1182}
1183
1184/////////////////
1185/////////////////////////////////////////////////// MULTI_THREAD SUITE ///////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 4

printAsRAMFunction · 0.85
toStdStringMethod · 0.80
allocMethod · 0.45
getPtrMethod · 0.45

Tested by

no test coverage detected