bod...@googlemail.com wrote:
And presumably cleans up the leftover object with the value of 42 when it
changes to point at the 43 object?
In principle, yes, the garbage collector will destroy the no-longer used
object 42 once nothing is pointing to it any more.
But in practice, Python cache
Joel Goldstick wrote:
If a value has no name bound to it, python figures that out and destroys it
Not quite... if there is no name, or any other reference, then the
garbage collector will destroy it. But it doesn't have to be a name:
anonymous objects can live inside lists, or dicts, or sets
On Tue, Apr 19, 2011 at 2:37 PM, Joel Goldstick wrote:
>
> On Tue, Apr 19, 2011 at 3:32 PM, wrote:
>
>> And presumably cleans up the leftover object with the value of 42 when it
>> changes to point at the 43 object?
>>
>> Or does it leave all changes in memory until the program exits?
>>
>
> If a
On Tue, Apr 19, 2011 at 3:32 PM, wrote:
> And presumably cleans up the leftover object with the value of 42 when it
> changes to point at the 43 object?
>
> Or does it leave all changes in memory until the program exits?
>
> Bodsda.
> Sorry for top posting, my phone won't let me change it
> Sent
And presumably cleans up the leftover object with the value of 42 when it
changes to point at the 43 object?
Or does it leave all changes in memory until the program exits?
Bodsda.
Sorry for top posting, my phone won't let me change it
Sent from my BlackBerry® wireless device
-Original Me