mac version:10.13
i just write the below code, then i found the memory rise when execute the for {} statement,1426 is other window's id:
NSWindow* mainWindow = [[NSApplication sharedApplication] mainWindow];
for(int i = 0; i < 60*60*100;++i)
{
//[mainWindow orderWindow:NSWindowBelow relativeTo:1426];
[mainWindow orderFrontRegardless];
}
i doubt the orderWindow api may have memory leaks, can anyone give me some suggest how to explain the situation or give me a alternative api to let my own window always follow a special other application's window.