You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jon Smirl <jo...@mediaone.net> on 2001/01/02 20:09:35 UTC

Xalan C++ and memory allocation

Has any work started on the C++ version with it's own DOM implementation?

I'd like to suggest creating two allocation/delete macros. One for global objects and one for instance data. This will let me do things like compile an XSL sheet into a global Apache pool and then run each instance in a local Apache pool. I'll null out the local delete macro and just let Apache take care of the local clean up. Apache automatically deletes everything in a local pool when the request completes.

This would also be a good debug tool. You could use MSVC to create a new local heap for each transform and then check at the end to make sure everything was deleted.

Local vs global objects also allows a non-thread safe allocator to be used on the local pool.

Jon Smirl
jonsmirl@mediaone.net