Kitura/Kitura-Credentials

Credentials.handle contains a retain cycle that causes huge memory leaks

Closed this issue · 2 comments

mman commented

The line here:

https://github.com/IBM-Swift/Kitura-Credentials/blob/master/Sources/Credentials/Credentials.swift#L99

creates a retain cycle which causes all requests and responses passing through the credentials handle method to be kept in memory indefinitely growing Kitura process with every request.

Originally reported here: Kitura/Kitura#1265

Sample project here: https://github.com/mman/leaky-kitura

FYI the fix in #63 was tagged in 2.1.1

mman commented

Excellent, thanks for helping me getting this fixed. In production for more than 24 hours now 👍