| Summary: | Memory leaks in tracing.ext when using with UML profiles | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] M2T | Reporter: | Tatiana Fesenko <tatiana.fesenko> | ||||||
| Component: | Xpand | Assignee: | Karsten Thoms <karsten.thoms> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | karsten.thoms | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 310361 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
|
Description
Tatiana Fesenko
Created attachment 205578 [details]
Proposed patch
I think this would be just a workaround for the problem. Having weak references is not good for traces, since traces may get lost during GC. We have to find another solution. The basic problem is that the TraceComponent uses this static TraceStore. The TraceStore must be local to the execution context. This could be achieved by moving the called trace methods to a new class TraceExtensions with non-static methods and deriving from AbstractStatefulExtensions, like in CounterExtensions. The next problem is that the TraceStore might want to get shared into the WorkflowContext, since the TraceComponent might want to dump the trace to a file. I'll have to think about a more general solution. (In reply to comment #2) > I think this would be just a workaround for the problem. Having weak references > is not good for traces, since traces may get lost during GC. My assumption was that since the model containing the source/target of the link is loaded there should be a strong reference to the traced elements. > We have to find another solution. The basic problem is that the TraceComponent > uses this static TraceStore. The TraceStore must be local to the execution > context. This could be achieved by moving the called trace methods to a new > class TraceExtensions with non-static methods and deriving from > AbstractStatefulExtensions, like in CounterExtensions. I didn't think of this possibility. This solution is more generic and safer. > The next problem is that the TraceStore might want to get shared into the > WorkflowContext, since the TraceComponent might want to dump the trace to a > file. > > I'll have to think about a more general solution. Thanks! This is a batch close of open M2T Xpand bugs. It is not planned work on this component in the foreseeable future. If you think this issue needs to be solved and you plan to contribute a fix then feel free to reopen it. |