Mercurial > dwindows
comparison mac/dw.m @ 2887:e8d28682f6bd
Mac: Oops, also need to free the userdata on dealloc().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 22 Dec 2022 18:48:57 +0000 |
parents | 70046eea3e65 |
children | 761b7a12b079 |
comparison
equal
deleted
inserted
replaced
2886:70046eea3e65 | 2887:e8d28682f6bd |
---|---|
1789 @implementation DWMenuItem | 1789 @implementation DWMenuItem |
1790 -(void)setCheck:(int)input { check = input; } | 1790 -(void)setCheck:(int)input { check = input; } |
1791 -(int)check { return check; } | 1791 -(int)check { return check; } |
1792 -(void *)userdata { return userdata; } | 1792 -(void *)userdata { return userdata; } |
1793 -(void)setUserdata:(void *)input { userdata = input; } | 1793 -(void)setUserdata:(void *)input { userdata = input; } |
1794 -(void)dealloc { dw_signal_disconnect_by_window(self); [super dealloc]; } | 1794 -(void)dealloc { UserData *root = userdata; _dw_remove_userdata(&root, NULL, TRUE); dw_signal_disconnect_by_window(self); [super dealloc]; } |
1795 @end | 1795 @end |
1796 | 1796 |
1797 /* Subclass for a scrollbox type */ | 1797 /* Subclass for a scrollbox type */ |
1798 @interface DWScrollBox : NSScrollView | 1798 @interface DWScrollBox : NSScrollView |
1799 { | 1799 { |