]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkVtkBlackBoxMacros.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkVtkBlackBoxMacros.h
index ce87d7e37c2ccc56472c16322767a65d7283360a..21816d3f9de43f510c60fb6f4bf19a5236c98786 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkVtkBlackBoxMacros.h,v $
   Language:  C++
-  Date:      $Date: 2009/02/27 11:20:25 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2009/04/30 14:31:31 $
+  Version:   $Revision: 1.9 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
 
 //===========================================================================
 #define BBTK_VTK_DELETE()                                              \
-  void bbDelete() {                                                    \
+  int bbDelete() {                                                     \
     for (int i=0; i<vtkParent::GetNumberOfInputPorts();++i)            \
       vtkParent::SetInput(i,0);                                                \
     bbGetOutputOut()->SetSource(NULL);                                 \
-    /*std::cout << "VTK : bbDelete() "<<std::endl;*/                   \
-    /*std::cout << "Use count = "<<GetUseCount()<<std::endl;*/         \
-    /*std::cout << "VTK count = "<<GetReferenceCount()<<std::endl;*/   \
-    /*    vtkParent::SetReferenceCount(1); GetUseCount());*/           \
-    /*delete this;     */                                              \
+    int refs = GetReferenceCount()-1;                                  \
     vtkParent::Delete();                                               \
+    return refs;                                                       \
   }
 
 //    bbmDescriptorPointer.reset();