Commit 0a889ce
committed
Correctly free DTrace resources.
Cython's cdef attributes are not regular class attributes as in Python.
hasattr(object, name) always returns False for a cdef attribute
corresponding to name.
Instead, we should simply check a pointer's value. I couldn't confirm
it in any documentation but, based on examples I found and my
experiments, it seems that a cdef pointer is always initially set to
NULL, at least when declared as a class attribute.1 parent a2c394a commit 0a889ce
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
| 336 | + | |
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
| |||
437 | 438 | | |
438 | 439 | | |
439 | 440 | | |
440 | | - | |
| 441 | + | |
441 | 442 | | |
442 | 443 | | |
443 | 444 | | |
| |||
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
459 | | - | |
| 460 | + | |
460 | 461 | | |
461 | 462 | | |
| 463 | + | |
462 | 464 | | |
463 | 465 | | |
464 | 466 | | |
| |||
0 commit comments