Closed quyatong closed 1 year ago
@quyatong By default, {index: i}
is not considered as memory leak by MemLab (it could be cache as your example app labeled). MemLab supports self-defined leak detector with the leakFilter
callback.
You can start with marking all objects allocated as leak and then refine the leak detector based on your app:
leakFilter(node, snapshot, leakedNodeIds) {
return true;
}
Note: the callback could also be defined in the scenario file.
Also check out this doc: https://facebook.github.io/memlab/docs/guides/guides-find-leaks
Great, thank you very much, I understood more about the MemLab
I created a SPA. The code was written below.
scenario file:
I wonder how to define whether there are leaks, tks for your answer~