If you're really careful, you can clean up the linked list before it goes out of scope and prevent this error:[two-way linked list example]
True, but way too much trouble. You may keep the original structure and just add a non-recursive disassembly:
my $i = 30000; my %h = (new => {}); my $r = \%h; for (0..$i) { print $_, "\r"; $r = $r->{new}; $r->{new} = {}; } $r = $h{new}; undef %h; while ($r) { $r = $r->{new}; } print "end\n";
In reply to Re^4: Segmentation fault
by martin
in thread Segmentation fault
by bloonix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |