mgedmin/objgraph

function `show_growth` return ``deltas``

xybaby opened this issue · 2 comments

I am using function show_growth to find memory leak in my project. Howerver, at the moment, the result outputs to stdout or file.I just wonder if we can return the result, with which we can automaticly detech memory leak when regression testing.
To achieve the target, I have two suggestion. First, simple but ungraceful, just return deltas in function show_growth. Second, adding a function get_growth, which return the increasing deltas, and the function show_growth just output the increasing deltas

Splitting this into two functions makes sense to me.

(This is what happened to show_most_common_types(): most_common_types() was extracted from it.)

ok, i have pulled a merge request