Help with Memory leaks...

118 views
Skip to first unread message

shar...@gmail.com

unread,
Jun 10, 2014, 1:01:08 PM6/10/14
to google-chrome-...@googlegroups.com
Hi,
 I am observing memory leaks on my web page and with Chrome tool profiler, I got following information. As shown in picture it shows delta of 10 for my object between snapshot 3 and 1. According to you tube video 


 i can ignore the nodes that are in yellow background. The picture shows that my objects are in yellow background but still they are not being released from memory(fact that delta is 10)... My question is, should i be concerned about these objects even though they are in yellow backgroud? If yes then how can i determine what is causing these objects to be not released from memory. When i expand, the node of an object, I see  most of the nodes are in Yellow background. I see an object "properties" that is not in yellow background, could that be reason for this object not releasing memory? Clicking on that object brings object retaining tree as shown in other pictures. What is the unit of size delta in following image? Is it in bytes?







Yury Semikhatsky

unread,
Jun 11, 2014, 8:14:26 AM6/11/14
to Google Chrome Developer Tools
Hi,


On Tue, Jun 10, 2014 at 9:01 PM, <shar...@gmail.com> wrote:
Hi,
 I am observing memory leaks on my web page and with Chrome tool profiler, I got following information. As shown in picture it shows delta of 10 for my object between snapshot 3 and 1. According to you tube video 


 i can ignore the nodes that are in yellow background. The picture shows that my objects are in yellow background but still they are not being released from memory(fact that delta is 10)... My question is, should i be concerned about these objects even though they are in yellow backgroud?
Yes. Yellow elements w/ yellow background should have a javascript retaining path starting at window global object (objects on that path should also be yellow). You should see it in "Object's retaining tree".
 
If yes then how can i determine what is causing these objects to be not released from memory. When i expand, the node of an object, I see  most of the nodes are in Yellow background. I see an object "properties" that is not in yellow background, could that be reason for this object not releasing memory? Clicking on that object brings object retaining tree as shown in other pictures.
On the first screenshot selected object is retainer by DOM node which is in the Document tree. On the second screenshot you selected (object properties) instance which is a part of internal implementation of JS object in V8. You shouldn't worry about it as it is just a part of internal representation of the function stored in "initialize" field.
 
What is the unit of size delta in following image? Is it in bytes?
"Size delta" is in bytes.
 







--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/bd6dd4e6-69ae-43b1-a7a2-aecf0598da16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ssharm...@gmail.com

unread,
Jun 11, 2014, 8:49:21 AM6/11/14
to google-chrome-...@googlegroups.com
Thanks a lot Yury for your response. I know for sure that even though the parent nodes are in yellow, still they are not release from memory and are causing memory leaks because the Delta is not zero between different snapshots. I am trying to figure out why they are not being release. I am attaching another screen print that shows the expanded nodes for objects in Yellow background. As can be seen for the nodes that are still not released from memory the tree under the node is different from the nodes that accessible from root node of window.

the top expanded nodes with immediate child node (_observerContext) is the node that i think should not be there. It should have been deleted.Looking at the following image does anything jumps out to you that might help me debug the cause of the problem. Why is that node deleted from memory? 

Yury Semikhatsky

unread,
Jun 16, 2014, 4:11:08 AM6/16/14
to Google Chrome Developer Tools
On Wed, Jun 11, 2014 at 4:49 PM, <ssharm...@gmail.com> wrote:
Thanks a lot Yury for your response. I know for sure that even though the parent nodes are in yellow, still they are not release from memory and are causing memory leaks because the Delta is not zero between different snapshots. I am trying to figure out why they are not being release. I am attaching another screen print that shows the expanded nodes for objects in Yellow background. As can be seen for the nodes that are still not released from memory the tree under the node is different from the nodes that accessible from root node of window.

the top expanded nodes with immediate child node (_observerContext) is the node that i think should not be there. It should have been deleted.Looking at the following image does anything jumps out to you that might help me debug the cause of the problem. Why is that node deleted from memory? 
It is hard to say based on the attached screenshot as it contains retaining tree for a function's code object while you are saying that it is ClientHoverMenu that is leaking. When you select an instance of <...>.MenuControls.ClientHoverMenu its retaining tree should contain all retaining paths, you should make sure all references in your application that are listed there are cleared in order to make the object collectable.
 






On Wednesday, June 11, 2014 8:14:26 AM UTC-4, Yury Semikhatsky wrote:
Hi,


On Tue, Jun 10, 2014 at 9:01 PM, <shar...@gmail.com> wrote:
Hi,
 I am observing memory leaks on my web page and with Chrome tool profiler, I got following information. As shown in picture it shows delta of 10 for my object between snapshot 3 and 1. According to you tube video 


 i can ignore the nodes that are in yellow background. The picture shows that my objects are in yellow background but still they are not being released from memory(fact that delta is 10)... My question is, should i be concerned about these objects even though they are in yellow backgroud?
Yes. Yellow elements w/ yellow background should have a javascript retaining path starting at window global object (objects on that path should also be yellow). You should see it in "Object's retaining tree".
 
If yes then how can i determine what is causing these objects to be not released from memory. When i expand, the node of an object, I see  most of the nodes are in Yellow background. I see an object "properties" that is not in yellow background, could that be reason for this object not releasing memory? Clicking on that object brings object retaining tree as shown in other pictures.
On the first screenshot selected object is retainer by DOM node which is in the Document tree. On the second screenshot you selected (object properties) instance which is a part of internal implementation of JS object in V8. You shouldn't worry about it as it is just a part of internal representation of the function stored in "initialize" field.
 
What is the unit of size delta in following image? Is it in bytes?
"Size delta" is in bytes.
 







--

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages