File: promise_leak.pl

package info (click to toggle)
libpromise-xs-perl 0.20-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 908 kB
  • sloc: perl: 1,097; ansic: 355; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 260 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env perl

use strict;
use warnings;

use Promise::XS;

$Promise::XS::DETECT_MEMORY_LEAKS = 1;

open STDERR, ">>&=", *STDOUT;

my $deferred = Promise::XS::deferred();

my $p = $deferred->promise();

undef $deferred;

my $ar = [ $p ];
push @$ar, $ar;