VariableFramePool implements IFramePool { @Override public void close() { buffers.clear(); used.clear(); allocateMem = 0; } VariableFramePool(IHyracksFrameMgrContext ctx, int memBudgetInBytes); @Override int getMinFrameSize(); @Override int getMemoryBudgetBytes(); @Override ByteBuffer allocateFrame(int frameSize); @Override void reset(); @Override void close(); static final int UNLIMITED_MEMORY; }
@Test public void testCloseShouldNotReuseExistingFrames() throws HyracksDataException { Set<?> set1 = testAllocateAllSpacesWithMinFrames(); pool.close(); Set<?> set2 = testAllocateAllSpacesWithMinFrames(); assertFalse(set1.equals(set2)); pool.close(); }