Skip to content
Prev 10723 / 15075 Next

rgl for R-devel

On 18/07/2014, 8:18 PM, Simon Urbanek wrote:
Thanks.  I forget where that code came from.  Obviously I don't know
much about OSX programming.

One other question that might be simple, or might not:  I'm seeing
problems in Cocoa because after a user closes an rgl window (by clicking
on the x on the frame), the cleanup code is not being called.  rgl declares

@interface GLView : NSOpenGLView {
  rgl::OSXWindowImpl *impl;
  NSUInteger lastModifierFlags;
}

- (id)initWithFrame:(NSRect)frame
        pixelFormat:(NSOpenGLPixelFormat *)pixelFormat
               impl:(rgl::OSXWindowImpl *)impl;
@end

and then in the implementation section has the cleanup code in

- (void)dealloc
{
  if (impl) impl->on_dealloc();
  [super dealloc];
}

but as far as I can tell this isn't being called when the user closes
the window.  Is there some other method that is called to allow cleanup?
 The Apple docs probably talk about this somewhere, but I haven't found
where...

Duncan Murdoch