Improved direct object memory management