On 4/26/11, Daniel Gibson <[email protected]> wrote: > 2. you can even use different custom allocators for the same class at > the same time (you'd have to be really careful not to screw that up by > using the wrong deallocator for an Object)
Maybe the allocator could annotate the class somehow, and the deallocator could check which allocator was used to create the object so it can call the matching deallocator. One way this could be done is through subclassing, but maybe that would mess things up. And this would probably mean runtime checks as well. I've never dealt with this before, but some ideas come to mind..
