diff --git a/BBGE/Cocoa.mm b/BBGE/Cocoa.mm index a65a0ea..dc52f0c 100644 --- a/BBGE/Cocoa.mm +++ b/BBGE/Cocoa.mm @@ -11,10 +11,10 @@ void cocoaMessageBox(const std::string &title, const std::string &msg) { - @autoreleasepool { - NSString *nstitle = @(title.c_str()); - NSString *nsmsg = @(msg.c_str()); - NSRunAlertPanel(nstitle, @"%@", nil, nil, nil, nsmsg); - } + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSString *nstitle = [NSString stringWithUTF8String:title.c_str()]; + NSString *nsmsg = [NSString stringWithUTF8String:msg.c_str()]; + NSRunAlertPanel(nstitle, @"%@", nil, nil, nil, nsmsg); + [pool drain]; }