Ah, no, _that_ fixes the malloc problem. I'd forgotten that midend.c
[sgt/puzzles] / macosx.m
index 0f53c5b..52a70ef 100644 (file)
--- a/macosx.m
+++ b/macosx.m
@@ -49,6 +49,9 @@
  *  - Can we arrange for a pop-up menu from the Dock icon which
  *    launches specific games, perhaps?
  * 
+ *  - Why are the right and bottom edges of the Pattern grid one
+ *    pixel thinner than they should be?
+ * 
  * Grotty implementation details that could probably be improved:
  * 
  *  - I am _utterly_ unconvinced that NSImageView was the right way
@@ -117,39 +120,19 @@ NSMenu *typemenu;
 @interface DataMenuItem : NSMenuItem
 {
     void *payload;
-    int payload_free;
 }
 - (void)setPayload:(void *)d;
-- (void)setPayloadFree:(BOOL)yesno;
 - (void *)getPayload;
 @end
 @implementation DataMenuItem
-- (id)initWithTitle:(NSString *)title
-    action:(SEL)act
-    keyEquivalent:(NSString *)key
-{
-    payload = NULL;
-    payload_free = NO;
-    return [super initWithTitle:title action:act keyEquivalent:key];
-}
 - (void)setPayload:(void *)d
 {
     payload = d;
 }
-- (void)setPayloadFree:(BOOL)yesno
-{
-    payload_free = yesno;
-}
 - (void *)getPayload
 {
     return payload;
 }
-- (void)dealloc
-{
-    if (payload_free)
-       sfree(payload);
-    [super dealloc];
-}
 @end
 
 /* ----------------------------------------------------------------------
@@ -485,7 +468,6 @@ struct frontend {
            [item setTarget:self];
            [item setAction:@selector(presetGame:)];
            [item setPayload:params];
-           [item setPayloadFree:YES];
 
            [typemenu insertItem:item atIndex:0];
        }