From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / OSX / InvertedSlider.m
index 642a3e4f73297d08a1fe74acc03ae3c9998db371..6ac0b4196bb31f0d28cb9d1c88c9fc990485a9b1 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2006-2013 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2015 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -83,8 +83,8 @@
 
 - (NSAttributedString *)attributedStringValue;
 {
-  // #### "Build and Analyze" says this leaks. Unsure whether this is true.
-  return [[NSAttributedString alloc] initWithString:[self stringValue]];
+  return [[[NSAttributedString alloc] initWithString:[self stringValue]]
+           autorelease];
 }
 
 -(void)setFloatValue:(float)v       { [self setDoubleValue: (double) v];      }