We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2e0fb1 commit 0bd3b25Copy full SHA for 0bd3b25
lib/PDL/Graphics/TriD/Object.pm
@@ -2,6 +2,7 @@ package PDL::Graphics::TriD::Object;
2
3
use strict;
4
use warnings;
5
+use Scalar::Util qw(weaken);
6
7
use fields qw(Objects ValidList ChangedSub List Options);
8
@@ -48,9 +49,9 @@ sub delete_object {
48
49
}
50
51
-# XXXXXXXXX sub {} makes all these objects and this window immortal!
52
sub add_object {
53
- my($this,$object) = @_;
+ my ($this,$object) = @_;
54
+ weaken $this;
55
push @{$this->{Objects}},$object;
56
$this->{ValidList} = 0;
57
for(@{$this->{ChangedSub}}) {
0 commit comments