spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [18/28] git commit: Release JVM reference to the ALSModel when done.
Date Thu, 26 Dec 2013 06:31:35 GMT
Release JVM reference to the ALSModel when done.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/cbb28111
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/cbb28111
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/cbb28111

Branch: refs/heads/master
Commit: cbb28111896844a0fd94346cd9c6f9926c706555
Parents: 20f85ec
Author: Tor Myklebust <tmyklebu@gmail.com>
Authored: Sun Dec 22 15:03:58 2013 -0500
Committer: Tor Myklebust <tmyklebu@gmail.com>
Committed: Sun Dec 22 15:03:58 2013 -0500

----------------------------------------------------------------------
 python/pyspark/mllib.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/cbb28111/python/pyspark/mllib.py
----------------------------------------------------------------------
diff --git a/python/pyspark/mllib.py b/python/pyspark/mllib.py
index 22187eb..1f5a5f6 100644
--- a/python/pyspark/mllib.py
+++ b/python/pyspark/mllib.py
@@ -357,8 +357,8 @@ class ALSModel(object):
         self._context = sc
         self._java_model = java_model
 
-    #def __del__(self):
-        #self._gateway.detach(self._java_model)
+    def __del__(self):
+        self._context._gateway.detach(self._java_model)
 
     def predict(self, user, product):
         return self._java_model.predict(user, product)


Mime
View raw message