You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2013/12/26 07:31:35 UTC

[18/28] git commit: Release JVM reference to the ALSModel when done.

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 <tm...@gmail.com>
Authored: Sun Dec 22 15:03:58 2013 -0500
Committer: Tor Myklebust <tm...@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)