Ravi Kiran V wrote:
My Object consists of other Objects which can live even after MyObject is destroyed ".
Now my question will this be not a memory leak ?
This is a misunderstanding. Aggregation is a design relationship. It has nothing to do with the disposal of objects when they're no longer used.
Ordinary composition describes how a class is constructed from other classes. Aggregation composition on the other hand describes the temporary relationships a class can form.
One example is a Car. A Car is constructed from of its Parts. It owns them. If a Part is misssing the Car is broken. Car forms a composition relationship with its Parts.
But a Car also can have Passengers. The Passengers aren't Parts of the Car. When a Passenger is missing the Car isn't broken. The Car doesn't own its Passengers. When they're not in the Car they're elsewhere. The relationship is temporary. Passengers come and go. Car forms an aggregation relationship with its Passengers.
Note that both are composition relationships really. A Car has Parts and it has Passengers. The difference is the duration. The relationship with Parts is forever whereas the relationship with Passengers is temporary.