Gtk2-Ex-TiedListColumn
view release on metacpan or search on metacpan
t/TiedListColumn.t view on Meta::CPAN
require Scalar::Util;
Scalar::Util::weaken ($aref);
is ($aref, undef, 'aref garbage collected when weakened');
}
{
my $store = Gtk2::ListStore->new ('Glib::String');
my $aref = Gtk2::Ex::TiedListColumn->new ($store);
require Scalar::Util;
Scalar::Util::weaken ($store);
ok ($store, 'store held alive by aref');
$aref = undef;
is ($store, undef, 'then garbage collected when aref gone');
}
#------------------------------------------------------------------------------
# accessors
{
my $store = Gtk2::ListStore->new ('Glib::String');
t/TiedMenuChildren.t view on Meta::CPAN
require Scalar::Util;
Scalar::Util::weaken ($aref);
is ($aref, undef, 'aref garbage collected when weakened');
}
{
my $menu = Gtk2::Menu->new;
my $aref = Gtk2::Ex::TiedMenuChildren->new ($menu);
require Scalar::Util;
Scalar::Util::weaken ($menu);
ok ($menu, 'store held alive by aref');
$aref = undef;
is ($menu, undef, 'then garbage collected when aref gone');
}
#------------------------------------------------------------------------------
# accessors
{
my $menu = Gtk2::Menu->new;
t/TiedTreePath.t view on Meta::CPAN
require Scalar::Util;
Scalar::Util::weaken ($aref);
is ($aref, undef, 'aref garbage collected when weakened');
}
{
my $path = Gtk2::TreePath->new;
my $aref = Gtk2::Ex::TiedTreePath->new ($path);
require Scalar::Util;
Scalar::Util::weaken ($path);
ok ($path, 'store held alive by aref');
$aref = undef;
is ($path, undef, 'then garbage collected when aref gone');
}
#------------------------------------------------------------------------------
# accessors
{
my $path = Gtk2::TreePath->new;
( run in 1.202 second using v1.01-cache-2.11-cpan-39bf76dae61 )