views:

26

answers:

1

I am new to Objective-C and as my first application I am writing I will be starting off with a simple WebKit based browser. So far I have done good and am able to load websites but after a while of usage memory usage tends to get high. I have read the documentation on retain, release, autorelease management and I just had one question. If I did release on my webkit view and created a new instance every time I loaded a new website would this mean my usage would drop down to its original state or am I misunderstanding how release works?

A: 

In theory, yes, the usage should drop down to it's original state as that releasing removes the frees the object off the heap.

The reason for the memory usage getting higher as you load more websites, is because WebKit retains bits of the website so it can load it up faster the next time.

kuroutadori