Comment 5 for bug 613851

Revision history for this message
Velveeta (rllindsey) wrote :

i'm not sure how the addBook() function works in your pastie example, does it do a call to $author->getBook_Collection()->add($book), and in addition, do a $book->setAuthor_Object($author)... ? because if there's no circular reference being created, then you won't see an effect from this fix... if it's only adding $book into the author's book collection, without linking back to author, then when author is destroyed, the book references should be destroyed as well (as long as there are no other variables holding onto references to those books)... but if the books are pointing properly at the author object, then when that object is destroyed, it won't even attempt to recycle it because it'll see references still pointing at that memory slot from within the object itself... if you could either pastie your addBook() function, or confirm the behavior of it, it might help me figure out why you're not seeing results...