Index: /OpenSceneGraph/trunk/src/osgPlugins/jp2/ReaderWriterJP2.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgPlugins/jp2/ReaderWriterJP2.cpp (revision 10939)
+++ /OpenSceneGraph/trunk/src/osgPlugins/jp2/ReaderWriterJP2.cpp (revision 10940)
@@ -177,5 +177,5 @@
             supportsExtension("jp2","Jpeg2000 image format");
             supportsExtension("jpc","Jpeg2000 image format");
-        
+
             // little dance here to get around warnings created by jas_image_strtofmt use of char* rather than const char*
             // as a parameted and modern compilers deprecating "jp2" string being treated as char*.
@@ -187,6 +187,11 @@
         }
 
+        ~ReaderWriterJP2()
+        {
+            jas_cleanup();
+        }
+
         virtual const char* className() const { return "RGB Image Reader/Writer"; }
-        
+
         virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options) const
         {
