From: Yukihiro Matsumoto Date: 2007-05-23T11:00:55+09:00 Subject: Re: Confusing array garbage collection, how to get valid heap snapshot? Hi, In message "Re: Confusing array garbage collection, how to get valid heap snapshot?" on Wed, 23 May 2007 09:40:04 +0900, Greg Fodor writes: |Shows that the 1000 objects in the array are still on the heap in the |second snapshot. Now, I realize GC.start makes no guarantees about |actually removing the objects marked, but it seems that in this case |they should go away since I am calling it so aggressively over such a |long period. What is really strange however is that if I all a.clear |before setting a to nil, the objects *do* go away upon the first |GC.start. So, either there is something still holding those references |in the above case, or the GC is extraordinarily conservative in |relation to GC.start. It sometimes happens. I am afraid the array address is pointed from somewhere in the machine stack. matz.