Ignore:
Timestamp:
10/29/09 11:09:03 (3 years ago)
Author:
SvenDowideit
Message:

Item2286: port memory leak changes from rel branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/lib/Foswiki.pm

    r5279 r5392  
    15541554    $query ||= new Foswiki::Request(); 
    15551555    my $this = bless( { sandbox => 'Foswiki::Sandbox' }, $class ); 
     1556 
    15561557    $this->{request}  = $query; 
    15571558    $this->{cgiQuery} = $query;    # for backwards compatibility in contribs 
     
    19081909=begin TML 
    19091910 
     1911---++ ObjectMethod DESTROY() 
     1912 
     1913called by Perl when the Foswiki object goes out of scope 
     1914(maybe should be used kist to ASSERT that finish() was called.. 
     1915 
     1916=cut 
     1917 
     1918#sub DESTROY { 
     1919#    my $this = shift; 
     1920#    $this->finish(); 
     1921#} 
     1922 
     1923=begin TML 
     1924 
    19101925---++ ObjectMethod finish() 
    19111926Break circular references. 
     
    19201935 
    19211936    $_->finish() foreach values %{ $this->{forms} }; 
    1922     $this->{plugins}->finish() if $this->{plugins}; 
     1937    $this->{plugins}->finish()   if $this->{plugins}; 
    19231938    undef $this->{plugins}; 
    1924     $this->{users}->finish() if $this->{users}; 
     1939    $this->{users}->finish()     if $this->{users}; 
    19251940    undef $this->{users}; 
    1926     $this->{prefs}->finish() if $this->{prefs}; 
     1941    $this->{prefs}->finish()     if $this->{prefs}; 
    19271942    undef $this->{prefs}; 
    19281943    $this->{templates}->finish() if $this->{templates}; 
    19291944    undef $this->{templates}; 
    1930     $this->{renderer}->finish() if $this->{renderer}; 
     1945    $this->{renderer}->finish()  if $this->{renderer}; 
    19311946    undef $this->{renderer}; 
    1932     $this->{net}->finish() if $this->{net}; 
     1947    $this->{net}->finish()       if $this->{net}; 
    19331948    undef $this->{net}; 
    1934     $this->{store}->finish() if $this->{store}; 
     1949    $this->{store}->finish()     if $this->{store}; 
    19351950    undef $this->{store}; 
    1936     $this->{search}->finish() if $this->{search}; 
     1951    $this->{search}->finish()    if $this->{search}; 
    19371952    undef $this->{search}; 
    1938     $this->{attach}->finish() if $this->{attach}; 
     1953    $this->{attach}->finish()    if $this->{attach}; 
    19391954    undef $this->{attach}; 
    1940     $this->{security}->finish() if $this->{security}; 
     1955    $this->{security}->finish()  if $this->{security}; 
    19411956    undef $this->{security}; 
    1942     $this->{i18n}->finish() if $this->{i18n}; 
     1957    $this->{i18n}->finish()      if $this->{i18n}; 
    19431958    undef $this->{i18n}; 
    19441959    $this->{cache}->finish() if $this->{cache}; 
    19451960    undef $this->{cache}; 
     1961#TODO: the logger doesn't seem to have a finish... 
     1962#    $this->{logger}->finish()      if $this->{logger}; 
     1963    undef $this->{logger}; 
    19461964 
    19471965    undef $this->{_HTMLHEADERS}; 
Note: See TracChangeset for help on using the changeset viewer.