X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;fp=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=cdfc9426d2f61c515d29230b32420e196dbd2365;hb=7e1774f762f0290fae3f9f9104a5d5dc52a1c017;hp=d390dc6858158b7745ac03a86a7457aac0b69608;hpb=86cdddbe2781f77d81d27cdd83910543c313a8f0;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index d390dc6..cdfc942 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -901,7 +901,24 @@ sub disconnect { #$self->_sql_maker(undef); # this may also end up being different }; - if( $self->_dbh ) { + # FIXME FIXME FIXME + # Something is wrong with CAG - it seems to delay GC in PP mode + # If the below if() is changed to: + # + # if( $self->_dbh ) { + # + # The the following will reproducibly warn as the weakref in a $txn_guard + # is *NOT* deallocated by the time the $txn_guard destructor runs at + # https://github.com/dbsrgits/dbix-class/blob/84efb6d7/lib/DBIx/Class/Storage/TxnScopeGuard.pm#L82 + # + # perl -Ilib -e ' + # BEGIN { warn $ENV{CAG_USE_XS} = ( time % 2 ) }; + # use DBIx::Class::Schema; + # my $s = DBIx::Class::Schema->connect("dbi:SQLite::memory:"); + # my $g = $s->txn_scope_guard; + # $s->storage->disconnect + # ' + if( $self->{_dbh} ) { # do not use accessor - see above $self->_do_connection_actions(disconnect_call_ => $_) for ( ( $self->on_disconnect_call || () ),