Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ and memory management



>Noone knows anything about this, or is it really impossible to do?
>
>Is noone using AspectJ with enormous object graphs? If yes, then how do
>you handle it?

As Wes says it seems you simply want lazy instantiation of X rather than
lazy definition of X or interface Y (which isn't supported by Java unless
you use Hot Code Replace). I presume you are concerned about footprint.
Using lazy instantiation you only incur the additional cost of the
reference to X in each class that implements the interface. The cost of
implementing the interface is fixed i.e. not dependent on the number of
instances. The lifetime of X is tied to that of A and will be garbage
collected at the same time.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/



Back to the top