[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Avoiding FFI- allocations + using SSE-vectors
- From: Josh Simmons <simmons.44@...>
- Date: Tue, 7 Feb 2012 11:42:02 +1100
On Tue, Feb 7, 2012 at 10:48 AM, Josh Haberman <jhaberman@gmail.com> wrote:
>
>> *And* since dropping a reference
>> can conceivably lead to the object being destroyed then and there, if it
>> was the last reference, it means you have to be really careful when
>> references get dropped.
>
> The flip side is that destroying happens at a predictable time. Garbage
> collection can also happen at unexpected times, but it is highly
> non-deterministic, so something that works 99% of the time can fail
> if GC happened to be initiated in a critical section.
>
I don't know if this is valid or not, but if you have a lot of
collection to do in one frame, with ref counting and manual collection
you're basically stuck with that but with an incremental collector you
can easily spread the collection across multiple frames. I always
thought as far as games were concerned limiting the GC to a specific
point and giving it a max time would be a good solution more than a
nasty hack. Provided you can't run over said limit too easily.