Post

Replies

Boosts

Views

Activity

Reply to Leaks when passing NSInputSteam to completionhandler in URLSession:task:needNewBodyStream:
I created and tested a sample from the built-in template using ARC as you told me, the leak occurred as well. When using the GET Method, no leaks occured, and when using the POST Method, leaks occured. To use Objective-C with the iOS App, I chose the Storyboard as the interface. You can download my sample and Leaks results from the following URL. Sample project(TestHttp) https://1drv.ms/u/s!AjI_SS2OaUbdgRVXDWnuxp4q1F7r?e=tKolBb Result of Leaks(inputStreamLeaks.trace, Run 1 ... POST Method, Run 2 ... GET Method) https://1drv.ms/u/s!AjI_SS2OaUbdgRI64XG2IFjOm2RW?e=qPudv7 You can find out if it has been leaked by searching word "input" from the Result of Leaks. You will see the leaked MyInputStream with a reference counter of 1 only in Run 1. Please confirm if it is indeed a problem on the OS side and if there is really no workaround. Thanks.
Dec ’21
Reply to Overrides symbols on linking
Thank you for the related article and for your efforts. Considering that the Xcode linker (BSD linker?) does not allow symbols to be referenced across objects, I guess the only way is to overwrite the entire object file. Fortunately, one object file is generated from one .cpp file, so it is possible to create an object file with partially different functionality by compiling it with another preprocessor macros. Of course, function override-like things can be realized. Conversely, unfortunately, in non-Makefile Xcode builds, the list of object files (.LinkFileList) is specified before the library flag -l is specified. This is not a problem in many cases, since the overwriting library can be specified before the target library. Thanks.
Mar ’24