NSHost cache; NSAutoreleasePool and rss
NSHost cache; NSAutoreleasePool and rss
- Subject: NSHost cache; NSAutoreleasePool and rss
- From: Lisa Zorn <email@hidden>
- Date: Fri, 12 Apr 2002 15:11:33 -0700
Hello,
I'm having a problem with NSHost caching. In particular,
[NSHost isHostCacheEnabled] always returns FALSE, even
if I setHostCacheEnabled to TRUE. No matter what,
I'm not getting caching (I verified this by instantiating
two NSHosts with the same IP; they are different).
My workaround is to cache NSHosts myself, which is fine,
but that bothers me a little bit because it's supposed
to already be there, according to the API.
Also, since I'm sending this email anyway, I
know this has been discussed somewhat before but I never
read a satisfying answer... I had a problem with an
NSAutoreleasePool. I have a thread that
runs a loop forever, processing data. I gave the thread
its own NSAutoreleasePool, and also put one right inside
the loop because the thread runs forever, and I don't want
it to keep consuming more and more memory.
Trouble is, if I put nothing more than
[NSString stringWithCString:<very long constant string>];
in the loop, and monitor ps, the RSS entry continues to
increase. Does NSAutoreleasePool's release method not
actually cause the memory to be released by the program?
Does anyone else experience this? Am I misinterpreting
something? Am I crazy?
Thanks,
-lisa
Glucose Development Corporation
http://www.glu.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.