GithubHelp home page GithubHelp logo

zombieobjectdetector's Issues

Remove logic from presentation

It would be good if the logic of zombie detection was separated from its presentation to the user.

When a zombie object is detected, rather than printing directly to the log, a callback should be invoked. Then we can make different types of presentation. For example, we could display the results in an editor window.

Also start searching from Scene.GetRootGameObjects.

Currently the search only starts from static fields of classes.

We could also start searching from Scene.GetRootGameObjects.

This would cover cases where a long running "manager" objects has a non-static field that points to zombies.

InvalidCastException: Specified cast is not valid.

InvalidCastException: Specified cast is not valid.
System.Reflection.Assembly.Equals (System.Object o) (at :0)
System.Collections.Generic.ObjectEqualityComparer1[T].Equals (T x, T y) (at <eae584ce26bc40229c1b1aa476bfa589>:0) System.Collections.Generic.HashSet1[T].Contains (T item) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
CSharpZombieDetector.ZombieObjectDetector+SearchContext.TestAndRecurse (System.Object obj) (at Library/PackageCache/com.unity.zombieobjectdetector@20b894e8c2/Runtime/ZombieObjectDetector.cs:134)

Change detection logic to be allocation-free.

See README.md.

Currently we perform detection by doing obj.ToString() == "null". This creates a temporary string that must eventually be garbage-collected.

It'd be better (?) to do something along the lines of:

System.Object o = ...; // (current object iteration logic)
UnityEngine.Object uo = o as UnityEngine.Object;
bool zombie = o != null && uo == null;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.