High CPU usage on macOS using COffscreenContext

Not sure if it helps, but here is how I’m creating my editor.

    [self.window setFrame:frame display:YES animate:YES];
    
    NSView* view = self.window.contentView;
    CRect r (0, 0, view.bounds.size.width, view.bounds.size.height);

    [[self window] setContentAspectRatio:NSMakeSize(view.bounds.size.width, view.bounds.size.height)];    
    
    editor = new Editor((__bridge void*)view);