Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Thank you eskimo for the reply.When i searched for the address of the string (found in heap memory) in Memory graph, it looked like NSMutableRequest was holding the data even though it is out of scope.NSMutableURLRequest -> NSURLRequestInternal -> CFHTTPMessage -> NSMutableArray -> NSMutableDictionary(Storage) -> NSConcreteDataAs the mapData used in the snippet was a local variable, its scope has ended with the execution of postDataTask .The problem was that the strings in the dictionary that was set as a part of HTTPBody of NSMutableURLRequest still stays in the heap memory even after the task is done.Was able to dump the strings using below commands:Step 1 : Connect lldb debugger to device/simulatorStep 2 : Import => "script import lldb.macosx.heap"Step 3 : Search for strings "cstr_refs CSTRING "darkhorse"" after the NSURLSessionDataTask is done