[opengtl-commits] [403] don't leak wrapped images |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 403
Author: cyrille
Date: 2008-09-20 12:45:04 +0200 (Sat, 20 Sep 2008)
Log Message:
-----------
don't leak wrapped images
Modified Paths:
--------------
trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp
Modified: trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp 2008-09-20 10:38:08 UTC (rev 402)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp 2008-09-20 10:45:04 UTC (rev 403)
@@ -172,6 +172,10 @@
void (*func)( int, int, int, int, const void**, void*) = ( void(*)(int, int, int, int, const void**, void*))GTLCore::VirtualMachine::instance()->getPointerToFunction( d->evaluatePixelesFunction);
SHIVA_ASSERT(func);
(*func)( _region.x(), _region.y(), _region.width(), _region.height(), inputImages, owrap);
+ for( std::size_t i = 0; i < _inputImages.size(); ++i)
+ {
+ delete (ImageWrap*)inputImages[i];
+ }
delete[] inputImages;
delete owrap;
SHIVA_DEBUG( "done" );