Forums | Admin

Discussion Forums: Hints and Tips

Start New Thread Start New Thread
Message: 82881
BY: Tim Hunter (rmagick)
DATE: 2009-06-20 17:59
SUBJECT: Tell RMagick to let Ruby manage image objects

 

RMagick 2.10.0 has experimental support for using Ruby-managed memory for all objects. In this mode Ruby can automatically garbage-collect unused images just like any other object.

To enable this support, add the line

RMAGICK_ENABLE_MANAGED_MEMORY = true

before requiring RMagick. You can programatically determine when RMagick is using Ruby memory by testing the constant

Magick::MANAGED_MEMORY

When this constant is true then RMagick is using Ruby memory.

This support is experimental. If you decide to take it out for a spin please share your experiences. Thanks!


Thread View

Thread Author Date
Tell RMagick to let Ruby manage image objectsTim Hunter2009-06-20 17:59
      RE: Tell RMagick to let Ruby manage image objTim Hunter2009-06-20 18:16
      RE: Tell RMagick to let Ruby manage image objectsJohn Chufar2010-11-05 16:34
            RE: Tell RMagick to let Ruby manage image objectsshelly qi2012-09-12 02:30

Post a followup to this message