Jump to content

Garbage Collection in Chrome Timeline


Yora
 Share

Recommended Posts

Hiya,

 

I'm wondering if this type of pattern (memory slowly piling up after each garbage collection then eventually clearing) resembles something like a memory leak or if it's in some way regular behavior.  This is in a project with quite a bit going on, but to my knowledge is not actively creating any new objects (at least not with the 'new' keyword).  

 

memory.png

 

I just want to make sure I'm not worrying over nothing, or if there is a problem that I address it.

 

Thanks for any help in advance.  :lol:

Link to comment
Share on other sites

 

From my experience (outside of game dev, but with app dev), this is pretty typical unless you use Object Pooling

 

 

I'm familiar with object pooling and am utilizing it, however I'll give this page a look since I see the same timeline pattern there, thanks.  I don't doubt that I could be missing somewhere that this could be happening by accident, I just wanted to be sure I identified the graph correctly before I continued chasing any potential problems.

 

Take a look here : https://www.scirra.com/blog/76/how-to-write-low-garbage-real-time-javascript ,  Ashley writes about garbage collection.

 

Objects can be allocated without using the 'new' keyword  , 

var a = {}

 , this create garbage to.

 

And what I have noticed also , drawing on canvas with float values also creates garbage.

 

Thanks for that tidbit, gives me something more apparent to look out for.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...