Page 1 of 1

Memory usage and storing objects references as custom props

Posted: Thu Jan 28, 2010 6:48 pm
by phao
I know a reference to something is normally WAY smaller than the thing itself, but I don't know how POL handles references to its objects.

So, is there any problem of high memory usage related to storing object references in custom properties?

I'm implementing a small chat system that uses a global property that is a dictionary mapping room names to array of player references. That is why I'm asking the question.

Re: Memory usage and storing objects references as custom props

Posted: Fri Jan 29, 2010 2:45 am
by Tomi
You should store the player serials instead and use SystemFindObjectBySerial to get the references again.

Re: Memory usage and storing objects references as custom props

Posted: Fri Jan 29, 2010 5:08 am
by CWO
As a general rule you should never store references in a prop. Do exactly as Tomi suggests with storing serials. This is because props and references don't play nice with eachother.