From dbe59099e4922caad5c0b3c655ae34c336294c28 Mon Sep 17 00:00:00 2001
From: Johannes Ranke <jranke@uni-bremen.de>
Date: Mon, 26 Oct 2015 09:48:31 +0100
Subject: Function for removing shared objects from workspace

---
 R/gmkinws.R | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'R')

diff --git a/R/gmkinws.R b/R/gmkinws.R
index f43c8a1..87eaf8a 100644
--- a/R/gmkinws.R
+++ b/R/gmkinws.R
@@ -36,6 +36,7 @@ gmkinws <- R6Class("gmkinws",
     observed = NULL,
     ds = NA,
     m = NA,
+    ftmp = list(Name = ""),
     f = NA,
 
     initialize = function(ds, m, f) {
@@ -145,6 +146,17 @@ gmkinws <- R6Class("gmkinws",
       self$f <- self$f[-i] 
       if (length(self$f) == 0) self$f <- NA
       invisible(self)
+    },
+
+    clear_compiled = function() {
+      for (i in seq_along(self$m)) {
+        self$m[[i]]$cf <- NULL
+      }
+      self$ftmp$mkinmod$cf <- NULL
+      for (i in seq_along(self$f)) {
+        self$f[[i]]$mkinmod$cf <- NULL
+      }
+      invisible(self)
     }
   )   
 )
-- 
cgit v1.2.1