question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SpriteRenderer#sprites retains destroyed sprites

See original GitHub issue

Steps

  • Take heap snapshot
  • add some bunny
  • take heap snapshot
  • destroy bunnies container
  • collect garbage
  • take an heap snapshot
  • filter by “Objects allocated between Snapshot 1 and Snapshot 2”

Try also to look at app.renderer.plugins.sprite.sprites before and after destroy them all

screen shot 2017-06-07 at 16 27 56

test.zip

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
englercjcommented, Jun 9, 2017

Thanks @lucap86 for the details, we’ll look into this as soon as we find time.

0reactions
lock[bot]commented, May 8, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The object of type 'SpriteRenderer' has been destroyed but ...
I have a character empty object, that has several objects within that has sprite renderer: example with screen shot:
Read more >
[SOLVED] Two-hit Brick Not Displaying Damaged Sprite - Talk
My setup is a little different. I have my own smoother looking brick that is replaced with the full brick sprite when it...
Read more >
Unity - Sprites Go Away In Scene View, But Not Game View
BUT, for some odd reason, Unity keeps the sprite loaded in the game view. It is gone in my scene view, so I...
Read more >
Phaser 3 API Documentation - Class: Sprite
A Sprite Game Object is used for the display of both static and animated images in your game. Sprites can have input events...
Read more >
Issues with Destroy and SpriteRenderer : r/Unity2D - Reddit
When I called Destroy(gameObject) the sprite of the object would remain in game, but all the colliders would stop working. I noticed if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found