diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-11-30 17:41:03 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-11-30 17:41:03 +0000 |
commit | fcf4c6a7e86fe05d48944afb0c96a8fe008d5d7c (patch) | |
tree | 8b6c53f6d9d4fb8391d19a90c11a76fc6d6a5f60 /modules/color | |
parent | 1c7f089dea266a8555da539b6924d566cfd2c0e9 (diff) | |
download | brdo-fcf4c6a7e86fe05d48944afb0c96a8fe008d5d7c.tar.gz brdo-fcf4c6a7e86fe05d48944afb0c96a8fe008d5d7c.tar.bz2 |
Improve memory usage of color.module (de-allocate images earlier)
Diffstat (limited to 'modules/color')
-rw-r--r-- | modules/color/color.module | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/color/color.module b/modules/color/color.module index dfdbce101..2558495c8 100644 --- a/modules/color/color.module +++ b/modules/color/color.module @@ -359,6 +359,9 @@ function _color_render_images($theme, &$info, &$paths, $palette) { // Blend over template imagecopy($target, $source, 0, 0, 0, 0, $width, $height); + // Clean up template image + imagedestroy($source); + // Cut out slices foreach ($info['slices'] as $file => $coord) { list($x, $y, $width, $height) = $coord; @@ -385,8 +388,7 @@ function _color_render_images($theme, &$info, &$paths, $palette) { $paths['map'][$file] = $base; } - // Clean up - imagedestroy($source); + // Clean up target buffer imagedestroy($target); } |