R
RayLopez99
Just an observation that I'm sure you experienced coders may have
noticed: if you have a list or array, and attempt to zero or .clear
it in one portion of your code, if that list or array appears in
another portion of your code it can still be "persistent" and non-
zero.
The solution: you have to go to that other portion of your code and
'zero it' or 'clear it' there, sometimes by dealing with the
persistent object itself and zeroing or clearing any data that gets
fed into the list or array you wish to clear.
If none of this makes sense, it's because you haven't coded enough.
Sorry I can't spoon feed you. Jon that means you, whereever you are.
I guess one solution, other than what I said above, is to manually
garbage collect the other portion of code that is causing your list or
array to be non-zero, but that has problems I think (I never touch the
garbage collection but rely on the automatic pilot).
So, my original solution of just zeroing or clearing any data feeding
into the array or list should work.
No big deal, but when OnPainting I was seeing stuff in my array/list
that I thought I had cleared, and I discovered it was because of
another persistent object that was hanging around and had a reference
to the array/list that was zeroed/cleared elsewhere in the code.
RL
noticed: if you have a list or array, and attempt to zero or .clear
it in one portion of your code, if that list or array appears in
another portion of your code it can still be "persistent" and non-
zero.
The solution: you have to go to that other portion of your code and
'zero it' or 'clear it' there, sometimes by dealing with the
persistent object itself and zeroing or clearing any data that gets
fed into the list or array you wish to clear.
If none of this makes sense, it's because you haven't coded enough.
Sorry I can't spoon feed you. Jon that means you, whereever you are.
I guess one solution, other than what I said above, is to manually
garbage collect the other portion of code that is causing your list or
array to be non-zero, but that has problems I think (I never touch the
garbage collection but rely on the automatic pilot).
So, my original solution of just zeroing or clearing any data feeding
into the array or list should work.
No big deal, but when OnPainting I was seeing stuff in my array/list
that I thought I had cleared, and I discovered it was because of
another persistent object that was hanging around and had a reference
to the array/list that was zeroed/cleared elsewhere in the code.
RL