This repository was archived by the owner on Dec 30, 2023. It is now read-only.
Commit 4ee7461
committed
fix segfault and memory leak in OctreePointCloudSearch
This is the segfault reported in #28.
__cinit__ unconditionally calls its base class version, so two objects
got allocated and one of them was leaked. Fixed by moving the actual
allocation to __init__.
Similarly, __dealloc__ would call its base class version and a "double
delete" would follow. Fixed by removing the child class's __dealloc__,
and set self.me to NULL explicitly in OctreePointCloud.__dealloc__ for
added safety.1 parent 6c1bc31 commit 4ee7461
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
| 569 | + | |
570 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
571 | 576 | | |
572 | 577 | | |
573 | 578 | | |
574 | | - | |
575 | | - | |
576 | 579 | | |
577 | | - | |
| 580 | + | |
578 | 581 | | |
579 | 582 | | |
| 583 | + | |
580 | 584 | | |
581 | 585 | | |
582 | 586 | | |
| |||
639 | 643 | | |
640 | 644 | | |
641 | 645 | | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | 646 | | |
646 | 647 | | |
647 | 648 | | |
| |||
0 commit comments