"leaks" command line tool not showing accurate number of leaks

I have enabled "enablePerformanceTestsDiagnostics" flag while running the unit tests through command line, so that it generates a pre and post-memgraph with respect to a unit test. Running "leaks" command on any of these memgraphs shows tremendous amount of leaks which obviously is not possible. Am I missing something due to which I am getting wrong number of leaks ? Code that represents leak : class Dog {

    var owner: Person?

    deinit {

        print("Deinint Dog")

    }

}

class Person {     var dog: Dog?     deinit {         print("Deinint Person")     } }

func createUsers() {     var mark : Person? = Person()     var pancho : Dog? = Dog()     mark?.dog = pancho     pancho?.owner = mark     mark = nil     pancho = nil }

snippet of "leaks" output :

leaks Report Version: 4.0, multi-line stacks

Process 485: 85631 nodes malloced for 7592 KB

Process 485: 4040 leaks for 170288 total leaked bytes.

"leaks" command line tool not showing accurate number of leaks
 
 
Q