Attached patch fixes the memory leak when running with -DPURIFY. In the original code the memory never gets freed because with -DPURIFY, the old_type_details->arena is always false. Gerard