Menu
Download Free Trial

Memory leak

I am creating the flex pivot as below:
 

$scope.mainPivot = $(pivotGridSelector).flexmonster({
global: {
localization: $scope.flexPivot.LocaleData //localeJsonpath
},
customizeCell: customizeCellFunction,
licenseKey: response.licenseKey,
beforetoolbarcreated: customizeToolbar,
componentFolder: "libs/flexmonster/",
toolbar: true,
height: "100%",
width: "100%",
report: flexReport
});

 
and on angular scope destroy, I have following code:
 

$scope.$on("$destroy", function() {

    $scope.mainPivot.dispose();
});

 
But I still see detached dom tree and they are pointing to flex nodes. What am I missing?
My application is leaking around 30MB everytime, when I open the page with flex and close it every time.
Please suggest.

6 answers

Public
Dmytro Zvazhii Flexmonster July 3, 2017

Hello Sohan,
Thank you for your question. Could you please provide us with the sample project so we can make some tests and reproduce the issue on our side? It will help us a lot in our further investigation.
Best regards,
Dmytro.

Public
Sohan July 4, 2017

Here is the fiddle for the same. I have not included angular code here,just flex pivot.
https://jsfiddle.net/sohansoni/qae2sxzk/3/
Observe the memory usage when this page is launched. Then do the create and dispose several times.
Observe the memory usage, It has gone up. Now in chrome dev tools take a heap snapshot.
I see lot of Detached DOM Tree related to flex

Public
Dmytro Zvazhii Flexmonster July 4, 2017

Hello Sohan,
Thank you for providing us with the example. We need to take some time on the investigation. The fix will be presented in the 2.4 major update which is going to be released in a month.
Best regards,
Dmytro.

Public
Sohan July 6, 2017

Thanks Dmytro, But were you able to reproduce it ?

Public
Dmytro Zvazhii Flexmonster July 6, 2017

Hello Sohan,
Yes, we have reproduced the issue.
Best regards,
Dmytro.

Public
Sohan July 6, 2017

Thank you for the confirmation !

Please login or Register to Submit Answer