(man I wish Notes would quote properly...) That's ok if it doesn't make this release. �I can always patch our version, not that I'm eager to do it. �:-) I can see why you want a project to be self contained. �Any changes made in the subproject stay in the subproject. �However, what is mutable in a project? �Not properties. �Once they are set, they stay set and unchanged. Even the docs back that up. :-] �So why copy them all again? The root problem isn't the fact that after p1.executeTargets its not being GC'ed (although that is a problem, and one easily fixed). �The problem lies in Ant's init() method. �During this method call the p1 project is created and ALL the calling project's properties are copied into it rather laboriously with the Project.setProperty method. �You can't get around having the new project created in the init task as the createProperty method needs it to exists for the call to p1.createTask. �While the calling project's build file is being parsed, every new Ant task is getting a new project with every property copied into it, and they sit there untill the call to execute. �And then stay around till the end of the entire build as you pointed out. Hmm... could we delay copying in the calling project's properties untill the execute method? �The subproject isn't actually parsed untill execute anyway, and thats when we need to properties to be available. �Its a relatively small change that would ease the memory requirements, coupled with setting p1 = null once its finished. Glenn McAllister TID - Software Developer - VisualAge for Java IBM Toronto Lab, (416) 448-3805 "An approximate answer to the right question is better than the right answer to the wrong question." - John W. Tukey Please respond to [EMAIL PROTECTED] To: � � � [EMAIL PROTECTED] cc: Subject: � � � �RE: [PATCH] Inheriting properties from a parent project (Project.java � � � �, ProjectHelper.java, Ant.java) Glenn, I do not think it will make this release :-). My initial reaction was some reservations about introducing a project hierarchy. Somehow I would rather see Project as self contained, not having to know whether it has a parent or not. As I said, that is just my initial reaction. Are others comfortable with this? Perhaps you could also address the root problem by removing the reference to the Project object in the ant task once p1.executeTarget returns, making it eligible for GC. Conor
