Changeset 9acbd37 in sasmodels
- Timestamp:
- Oct 5, 2016 4:28:54 PM (8 years ago)
- Children:
- 8b10fdf
- Parents:
- 71f8bdb
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
rb01a603 r9acbd37 73 73 import tempfile 74 74 import ctypes as ct # type: ignore 75 import _ctypes as _ct 75 76 from ctypes import c_void_p, c_int32, c_longdouble, c_double, c_float # type: ignore 76 77 import logging … … 259 260 # Note: if there is a syntax error then compile raises an error 260 261 # and the source file will not be deleted. 261 #os.unlink(filename)262 print("saving compiled file in %r"%filename)262 os.unlink(filename) 263 #print("saving compiled file in %r"%filename) 263 264 return dll 264 265 … … 301 302 def _load_dll(self): 302 303 # type: () -> None 303 print("dll", self.dllpath)304 304 try: 305 305 self._dll = ct.CDLL(self.dllpath) … … 344 344 Release any resources associated with the model. 345 345 """ 346 dll_handle = self._dll._handle 346 347 if os.name == 'nt': 347 #dll = ct.cdll.LoadLibrary(self.dllpath)348 dll = ct.CDLL(self.dllpath)349 dll_handle = dll._handle350 #dll_handle = ct.c_void_p(dll._handle)351 del dll, self._dll352 self._dll = None353 348 ct.windll.kernel32.FreeLibrary(dll_handle) 354 349 else: 355 pass 356 350 _ct.dlclose(dll_handle) 351 del self._dll 352 self._dll = None 357 353 358 354 class DllKernel(Kernel): -
sasmodels/sasview_model.py
r9c1a59c r9acbd37 575 575 magnetic=is_magnetic) 576 576 calculator.release() 577 self._model.release() 577 578 return result 578 579
Note: See TracChangeset
for help on using the changeset viewer.