Slightly change the memory management API.

Also fix a bug where OFBigDataArray would waste memory.