memory management optimizations.