Contents

kuniwak/memoryleaktestkit

A testing library to detect memory leaks for Swift.

Supported Platforms

| Platform | Build Status | |:---------|:-------------| | Linux | [[CircleCI]](https://circleci.com/gh/Kuniwak/MemoryLeakTestKit/tree/master) | | iOS | [[Build Status]](https://app.bitrise.io/app/457e68f44175b9c9) |

Usage

import MemoryLeakTestKit


let memoryLeaks = detectLeaks {
    // Create a instance
    return target
}

XCTAssertTrue(
    memoryLeaks.leakedObjects.isEmpty,
    memoryLeaks.prettyDescription
)

Example output

Summary:
    Found 2 leaked objects

Leaked objects:
    0:
        Description: Node
        Type: Node
        Location: (root).linkedNodes[0]
        Circular Paths: 
            self.linkedNodes[1] === self
    
    1:
        Description: Node
        Type: Node
        Location: (root)
        Circular Paths: 
            self.linkedNodes[0].linkedNodes[0] === self

License

MIT

Package Metadata

Repository: kuniwak/memoryleaktestkit

Default branch: master

README: README.md