This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory question

 
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic