Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release null objects from MemoryPoolBase #446

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Release null objects from MemoryPoolBase #446

wants to merge 1 commit into from

Commits on Apr 10, 2018

  1. In Unity MemoryPool entries can become null through calls to Object.D…

    …estroy(entry). When the MemoryPool returns a value, which has been destroyed, this will cause problems. This is in problematic for MonoMemoryPool which can hold references to objects in a scene which is unloaded. I've added a minor addition to MemoryPoolBase which will release items which are null. It now pops items until it finds one which is not null and expands the pool whenever all items are popped (e.g. all items are destroyed because they belonged to an unloaded scene)
    Kevin Streicher committed Apr 10, 2018
    Configuration menu
    Copy the full SHA
    a24987e View commit details
    Browse the repository at this point in the history