On 16 May 2016 at 17:43, Philippe Hausler wrote:
> I think there is probably some likely issue with the fact that NSMutableData
> is a subclass and the layout initialization is not properly setup during the
> init for that object.
>
> __kCFDontDeallocate is used to mark the allocated memory as m
I think there is probably some likely issue with the fact that NSMutableData is
a subclass and the layout initialization is not properly setup during the init
for that object.
__kCFDontDeallocate is used to mark the allocated memory as managed by the
deallocator blocks. So I bet the problem is
import Foundation
while true {
var myData: NSMutableData? = NSMutableData(capacity: 0)
myData = nil
}
Running this infinite loop with swift-corelibs-foundation shows a steady
memory leak, with the process's RSS increasing over time. No leak is seen
with Foundation on Darwin.
Instrumenting w