David Norwood wrote:
> To tell you the truth, I've seen this question asked many times but
> never seen an example of code that causes a memory leak in misterhouse.
It's always been unbounded arrays that I've seen be the culprit.
Specifically, shoving the same value or object into an array w/o
checking on its existence first (if appropriate). An example here of
proper bounding is Base_Item::add_item_if_not_present. If memory leaks
happen on reload, then it's usually non-object arrays that I've seen in
both common code and libs.
Also, consuming memory doesn't necessarily mean a "leak" (where the
occurrence is accidental) since some code/objects "accumulate"
data/objects over time.
I don't see my own mh instance grow by more than 10M over a week. So, I
attribute that to either "slow leaks" or just normal object "accumulated
bloat". And, since I routinely develop libs, then I have to restart
usually far more frequently. Any time I've seen memory leaks grow by
more than that, tracking it down requires you to know a great deal about
what your specific environment/config is implying as well as detailed
knowledge of the code. Unfortunately, no "magic bullets" for easy
detection (unless good "gut intuition" counts).
Gregg
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-
http://p.sf.net/sfu/adobe-com________________________________________________________
To unsubscribe from this list, go to:
http://sourceforge.net/mail/?group_id=1365