Re: Simple memory problem

2009-02-06 Thread harry greenmonster
I cant help but think the preferable way Objective C should would is to send a release automatically to the receiver of a product of itself. inputString = [inputString myMethod]; Its fairly clear in this situation that the original 'inputString' is not wanted and needs to die, and would

Re: Simple memory problem

2009-02-06 Thread harry greenmonster
want to compiler automatically releasing stuff for you. Bryan On Feb 6, 2009, at 5:24 AM, harry greenmonster wrote: I cant help but think the preferable way Objective C should would is to send a release automatically to the receiver of a product of itself. inputString = [inputString

Re: Simple memory problem

2009-02-06 Thread harry greenmonster
Forgot to add: As long as the returned type was the same. So instead.. inputString = [inputString StringFromMyMethod]; On 6 Feb 2009, at 13:32, harry greenmonster wrote: Yes, memory management is a weak point of mine, which I'm currently trying to resolve. Last time I had any use

Re: Simple memory problem

2009-02-06 Thread harry greenmonster
On 6 Feb 2009, at 14:18, Steve Sisak wrote: If you use an Objective-C 2.0 property (rather than a variable) and specifying retain semantics, you'll get that behavior -- with a bit of overhead. Ah interesting, just the kind of result I was hoping to obtain from asking dumb questions. In

Simple memory problem

2009-02-05 Thread harry greenmonster
while([inputString isMatchedByRegex:regexString]){ range = [inputString rangeOfRegex:regexString]; inputString = [inputString stringByReplacingCharactersInRange:range withString:@]; } 'inputString' is a 5mb text file, Activity Monitor shows that memory

Re: Simple memory problem

2009-02-05 Thread harry greenmonster
I had already tried an NSAutoreleasePool but came across issues, it released inputString so as useless for the next iteration. So I tried keeping it around with... if (inputString != nil) { [inputString retain]; /* Keep match around.

Re: Simple memory problem

2009-02-05 Thread harry greenmonster
NSMutableString, good idea, I think that will work, will try that thanks. And thanks everyone else. On 6 Feb 2009, at 00:16, Shawn Erickson wrote: On Thu, Feb 5, 2009 at 3:39 PM, harry greenmonster southwestmons...@googlemail.com wrote: 'inputString' is a 5mb text file, Since

'Configure Sheet' fails when containing a WebView

2008-05-23 Thread harry greenmonster
Hi I have a screensaver which I'm building, I have created a 'configure sheet' accessed by the 'options' button in 'system preferencesscreensaver'. In IB I drag WebView onto my 'configure sheet', then when I test the screensaver the 'options button' fails to open the sheet. If I delete