Exemplo n.º 1
0
    void
    operator()(
                Type*               theArg,
                MemoryManagerType&  theMemoryManager)
    {
        if (theArg != 0)
        {
            (*this)(*theArg);

            theMemoryManager.deallocate(theArg);
        }
    }
Exemplo n.º 2
0
inline void
destroyObjWithMemMgr(const Type* ptr, MemoryManagerType& theManager)
{
    if (ptr != 0)
    {
        Type* const     nonConstPointer =
#if defined(XALAN_OLD_STYLE_CASTS)
            (const Type*)ptr;
#else
            const_cast<Type*>(ptr);
#endif
        nonConstPointer->~Type();

        theManager.deallocate(nonConstPointer);
    }
}