Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Memory question  RSS feed

 
Shane Roylance
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a member variable that is an array of objects. If I were to do something like this:

1- Will myObjects point to a new array the second time through the loop (am I changing the pointer)?
2- Will the old array that I orphaned be picked up by the garbage collector?
TIA
Shane
[ August 06, 2002: Message edited by: Shane Roylance ]
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shane,
1- Will myObjects point to a new array the second time through the loop (am I changing the pointer)?

Yes.
2- Will the old array that I orphaned be picked up by the garbage collector?

Yes, eventually.
Michael Morris
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!