diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2017-01-02 11:31:52 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2017-01-02 11:31:52 +0100 |
commit | ff79a9c213dfd75ea00ed5112d3a6e314601e064 (patch) | |
tree | 19ecef47bf11803fc4fc59e06c185c65aa7fdd19 /tikzit/src/common/EdgeStyle.m | |
parent | 9e4f8a6ff37161da4fa0af14604ad22d9c212fde (diff) | |
parent | 49c0d2041f0aae6d08d325b7f7fc1cd707d942f8 (diff) |
Merge branch 'arc'
Diffstat (limited to 'tikzit/src/common/EdgeStyle.m')
-rw-r--r-- | tikzit/src/common/EdgeStyle.m | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tikzit/src/common/EdgeStyle.m b/tikzit/src/common/EdgeStyle.m index 39810fa..c61e94a 100644 --- a/tikzit/src/common/EdgeStyle.m +++ b/tikzit/src/common/EdgeStyle.m @@ -77,10 +77,12 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [name release]; [category release]; [colorRGB release]; [super dealloc]; +#endif } - (NSString*) description { @@ -98,7 +100,11 @@ } + (EdgeStyle*)defaultEdgeStyleWithName:(NSString*)nm { +#if __has_feature(objc_arc) + return [[EdgeStyle alloc] initWithName:nm]; +#else return [[[EdgeStyle alloc] initWithName:nm] autorelease]; +#endif } - (NSString*)name { return name; } @@ -107,7 +113,9 @@ NSString *oldValue = name; name = [s copy]; [self postPropertyChanged:@"name" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; +#endif } } @@ -147,8 +155,10 @@ NSString *oldValue = category; category = [s copy]; [self postPropertyChanged:@"category" oldValue:oldValue]; - [oldValue release]; - } +#if ! __has_feature(objc_arc) + [oldValue release]; +#endif + } } - (ColorRGB*)colorRGB { @@ -160,8 +170,10 @@ ColorRGB *oldValue = colorRGB; colorRGB = [c copy]; [self postPropertyChanged:@"colorRGB" oldValue:oldValue]; - [oldValue release]; - } +#if ! __has_feature(objc_arc) + [oldValue release]; +#endif + } } - (NSString*)tikz { |