| 57 | } |
| 58 | |
| 59 | bool |
| 60 | OfxMemory::alloc(size_t nBytes) |
| 61 | { |
| 62 | bool ret = false; |
| 63 | |
| 64 | freeMem(); // ignore return value |
| 65 | try { |
| 66 | ret = _memory->alloc(nBytes); |
| 67 | } catch (const std::bad_alloc &) { |
| 68 | return false; |
| 69 | } |
| 70 | |
| 71 | return ret; |
| 72 | } |
| 73 | |
| 74 | bool |
| 75 | OfxMemory::freeMem() |
no outgoing calls
no test coverage detected