parent
725f4c36f2
commit
7c82dc92b2
@ -479,7 +479,7 @@ class DMatrix(object):
|
|||||||
nthread))
|
nthread))
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
if self.handle is not None:
|
if hasattr(self, "handle") and self.handle is not None:
|
||||||
_check_call(_LIB.XGDMatrixFree(self.handle))
|
_check_call(_LIB.XGDMatrixFree(self.handle))
|
||||||
self.handle = None
|
self.handle = None
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user