Changeset 5018

Show
Ignore:
Timestamp:
10/01/08 20:38:01 (9 months ago)
Author:
jwage
Message:

[1.1] fixes #1276 Added Doctrine::ATTR_AUTO_FREE_QUERY_OBJECTS for auto freeing query objects after execution

Location:
branches/1.1
Files:
1 added
5 modified

Legend:

Unmodified
Added
Removed
  • branches/1.1/lib/Doctrine.php

    r4950 r5018  
    197197    const ATTR_USE_DQL_CALLBACKS        = 164; 
    198198    const ATTR_AUTO_ACCESSOR_OVERRIDE   = 165; 
     199    const ATTR_AUTO_FREE_QUERY_OBJECTS  = 166; 
    199200 
    200201    /** 
  • branches/1.1/lib/Doctrine/Configurable.php

    r5000 r5018  
    183183            case Doctrine::ATTR_USE_DQL_CALLBACKS; 
    184184            case Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE; 
     185            case Doctrine::ATTR_AUTO_FREE_QUERY_OBJECTS; 
    185186 
    186187                break; 
  • branches/1.1/lib/Doctrine/Manager.php

    r4869 r5018  
    104104                        Doctrine::ATTR_USE_DQL_CALLBACKS        => false, 
    105105                        Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE   => false, 
     106                        Doctrine::ATTR_AUTO_FREE_QUERY_OBJECTS  => false, 
    106107                        );  
    107108            foreach ($attributes as $attribute => $value) { 
  • branches/1.1/lib/Doctrine/Query/Abstract.php

    r5014 r5018  
    11001100            } 
    11011101        } 
    1102  
     1102        if ($this->getConnection()->getAttribute(Doctrine::ATTR_AUTO_FREE_QUERY_OBJECTS)) { 
     1103            $this->free(); 
     1104        } 
    11031105        return $result; 
     1106    } 
     1107 
     1108    /** 
     1109     * Blank template method free(). Override to be used to free query object memory 
     1110     */ 
     1111    public function free() 
     1112    {  
    11041113    } 
    11051114 
  • branches/1.1/tests/run.php

    r5014 r5018  
    116116$tickets->addTestCase(new Doctrine_Ticket_1254_TestCase()); 
    117117$tickets->addTestCase(new Doctrine_Ticket_1257_TestCase()); 
     118$tickets->addTestCase(new Doctrine_Ticket_1276_TestCase()); 
    118119$tickets->addTestCase(new Doctrine_Ticket_1277_TestCase()); 
    119120$tickets->addTestCase(new Doctrine_Ticket_1280_TestCase());