[Rt-commit] [svn] r1757 - in rt/branches/3.3-TESTING: . lib/RT

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Mon Nov 8 22:47:14 EST 2004


Author: jesse
Date: Mon Nov  8 22:47:13 2004
New Revision: 1757

Modified:
   rt/branches/3.3-TESTING/   (props changed)
   rt/branches/3.3-TESTING/lib/RT/Base.pm
Log:
 r8941 at tinbook:  jesse | 2004-11-08T17:18:03.357715Z
 Added a bit of documentation to RT::Base; removed an unused line of code
 


Modified: rt/branches/3.3-TESTING/lib/RT/Base.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/Base.pm	(original)
+++ rt/branches/3.3-TESTING/lib/RT/Base.pm	Mon Nov  8 22:47:13 2004
@@ -72,6 +72,9 @@
     if (@_) {
         $self->{'original_user'} = $self->{'user'};
         $self->{'user'} = shift;
+        # We need to weaken the CurrentUser ($self->{'user'}) reference
+        # if the object in question is the currentuser object.
+        # This avoids memory leaks.
         Scalar::Util::weaken($self->{'user'}) if (ref($self->{'user'}) &&
                                                     $self->{'user'} == $self );
     }
@@ -79,7 +82,6 @@
     unless ( ref( $self->{'user'}) ) {
         $RT::Logger->err( "$self was created without a CurrentUser\n" . Carp::cluck() );
         return (0);
-        die;
     }
     return ( $self->{'user'} );
 }


More information about the Rt-commit mailing list