Thanks a lot, @eskimo.
Please refer to FB9942875.
just found if any variable even primitive types captured by the block of setTerminationHandler, then there is a leak:
void testLeaks() {
int abc = 123;
NSTask* task = [[NSTask alloc] init];
[task setTerminationHandler:^(NSTask* inTask) {
NSLog(@"setTerminationHandler %d %d", inTask.terminationStatus, abc);
}];
[task release];
}
The output is the same:
Process 10635: 593 nodes malloced for 59 KB
Process 10635: 1 leak for 48 total leaked bytes.
1 (48 bytes) ROOT LEAK: <__NSMallocBlock__ 0x7f935ed09690> [48] testLeaks2 invocation function for block in testLeaks() 0x10a6a27e0
Hi @eskimo, I verified this issue can not be reproduced on 12.0.1. Looks Apple fixed it:)
I will do it, thanks a lot! @eskimo.
Btw: I feel there is a security concern if a process is muted by path, let's say if I muted a trusted process by path, however, the process might be replaced by a totally different one with the same path, then the events of the "new" one also are muted, right?
Post not yet marked as solved
could be a system bug? since looks like the infinite "close" send from _NSThemeCloseWidget, no stack of the App is involved...
[[NSProcessInfo processInfo] operatingSystemVersion]
Thanks OOPer, I just wan to compare the app path for different OS version:
std::vector<Config> gConfigs = { {@APP_PATH, @OSVersion}, ...};
...
In the compare:
if (@available(@OSVersion, *) {...}
Is there any avaiable API?
Thanks, Eskimo.
The testing code is intentional not for singleton, just want to confirm there is no memory leak if I did so:)
Ok, I have solved this problem by myself. Please ping me if anyone wants to know.
Post not yet marked as solved
Hi eskimo,My library was integrated with a system extension developed by another team, I just want to debug it quickly without code change due to I already have dSYM and source code.
Post not yet marked as solved
Thanks, eskimo:PHow about if I don't have the source code?
Thanks, John for your clarification.
Hi eskimo,Glad to see your reply:)Actually, I want to create the shell script to do so(delete App), but I can still see the system extension after reboot.
Post not yet marked as solved
A big thank for your clarification, eskimo.Yes, I'm using concurrent queues in my App without label, so far the tasks are running concurrently, however, they may run serially according to you description above.Anyway, I have to set label for concurrent queue in order to guarantee it works as expected alway?
Post not yet marked as solved
Thanks, eskimo.Because I need to analyze the sample log of Apps, such as deadlock..., it's confusing me if the info of dispatch queue is incorrect.