> One way to reduce memory bloat and initialization time is to declare
> the local properties of an object as prototype properties. Prototype
> properties do NOT take up extra space when an object is instantiated
> UNLESS you change the instances' local value. For instance,
But avoid this pitfal
> this also causes problems. if you attach an object (for example, the
> list
> uses an object for the style details) to the prototype, it only attaches
> a
> link to a single instance of this object. this results in each instance
> having the same style.
Is it me or is this list really sllooo
this also causes problems. if you attach an object (for example, the
list
uses an object for the style details) to the prototype, it only attaches
a
link to a single instance of this object. this results in each instance
having the same style. This is just a simple example of how each type
of
p
Optimizing code is always a good idea. I try to do it myself always. However,
when speaking of DynLayers, keep in mind that the amount of system resources
used by one DynLayer instance is almost ridiculous compared to the system
resources used by the layer itself. Remember Amhdal's law: the total
subject of inheriting:
have you tried this with multiple inheriting (parent-child-child-etc) and
multiple
instances of a the same object type.. with events and all other
functionality still working..
just wondering :)
Pascal Bestebroer
[EMAIL PROTECTED]
www.dynamic-core.net
One way to reduce memory bloat and initialization time is to declare
the local properties of an object as prototype properties. Prototype
properties do NOT take up extra space when an object is instantiated
UNLESS you change the instances' local value. For instance,
function myObj(){
this.fooF