Thanks. We can improve on that a bit, by using one of the pointers to indicate whether the storage is allocated, instead of requiring an extra boolean for this information. I pushed the attached patch.