| 1168 | } |
| 1169 | |
| 1170 | OFX::Host::Memory::Instance* |
| 1171 | OfxHost::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 /////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected