Reinitializing memory manager when serializing objects in session