Unit testing javascript for a memory leak -
is there way unit test javascript memory leaks? mean is, there way access heap directly javascript code check detached dom trees or increased memory usage?
i know can chrome dev tools, i'm wondering if there's way directly unit tests, since seems tedious write code, take heap snapshot, perform potentially memory leaking operation, take heap snapshot, , repeat every single potentially memory leaking operation, every time write snippet of code. not mention adding code in 1 place may cause unexpected memory leak in part of application.
it's wrote application had huge memory leak, , had start scratch. when develop application time around, want make sure unit tests can detect i've created memory leak, , can eliminate possible.
i think i've seen tools c++, not javascript. know of any? thank you!
to check memory leaks, need have access memory allocation size or size of variables. there's no possibility in javascript.
Comments
Post a Comment