Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UnityEvent.RemoveListener doesn'r remove all references to the object

Discussion in 'Editor & General Support' started by Hullabu, Oct 30, 2018.

  1. Hullabu

    Hullabu

    Joined:
    Oct 23, 2014
    Posts:
    18
    How to reproduce:
    - Subscribe some class on UnityEvent
    - Do Invoke Event
    - Unsubscribe
    UnityEvent object still have a reference to the "some class" - destructor never calling until UnityEvent is alive or next Invoke will be called.

    I reported this bug twice through the Unity, but didn't get any confirmation email (i used two different adresses).
    Test project attached.
     

    Attached Files: