From 1b3eee6d78438b14b437fa6036ef6a1cf45af578 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 26 Oct 2013 10:18:48 -0400 Subject: GRAPHICS: Clarify implicit destroy() usage --- graphics/decoders/image_decoder.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/graphics/decoders/image_decoder.h b/graphics/decoders/image_decoder.h index 49e31c6e3a..a39a9a1493 100644 --- a/graphics/decoders/image_decoder.h +++ b/graphics/decoders/image_decoder.h @@ -44,6 +44,9 @@ public: /** * Load an image from the specified stream + * + * loadStream() should implicitly call destroy() to free the memory + * of the last loadStream() call. * * @param stream the input stream * @return whether loading the file succeeded @@ -54,6 +57,9 @@ public: /** * Destroy this decoder's surface and palette + * + * This should be called by a loadStream() implementation as well + * as the destructor. */ virtual void destroy() = 0; -- cgit v1.2.3