]> git.mxchange.org Git - simgear.git/commitdiff
Canvas: use new naGCSave/naGCRelease functions.
authorThomas Geymayer <tomgey@gmail.com>
Mon, 14 Oct 2013 22:49:13 +0000 (00:49 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Mon, 14 Oct 2013 22:49:13 +0000 (00:49 +0200)
simgear/canvas/CanvasEventListener.cxx
simgear/canvas/CanvasSystemAdapter.hxx

index 03675ff78ba33fad8bb03872d418007dc7cee862..5dcfab516cb72107d6dc112d8a744f18d44bdcdd 100644 (file)
@@ -43,14 +43,13 @@ namespace canvas
         "canvas::NasalEventListener: invalid function argument"
       );
 
-    _gc_key = sys_adapter->gcSave(_code);
+    _gc_key = naGCSave(_code);
   }
 
   //----------------------------------------------------------------------------
   NasalEventListener::~NasalEventListener()
   {
-    if( !_sys.expired() )
-      _sys.lock()->gcRelease(_gc_key);
+    naGCRelease(_gc_key);
   }
 
   //----------------------------------------------------------------------------
index a2bb1fe281ec4edf27bfd9f8812da548f2673e92..6a250f4da4dea8b6dcfdb727217d47a5351dbd51 100644 (file)
@@ -39,18 +39,6 @@ namespace canvas
 
       virtual naContext getNasalContext() const = 0;
 
-      /**
-       * Save passed reference to Nasal object from being deleted by the
-       * garbage collector.
-       */
-      virtual int gcSave(naRef r) = 0;
-
-      /**
-       * Release an object previously passed to ::gcSave to allow it being
-       * cleaned up by the garbage collector.
-       */
-      virtual void gcRelease(int key) = 0;
-
       /**
        * Call a Nasal function with the given environment and arguments.
        */