]> gerrit.simantics Code Review - simantics/platform.git/commit
Fixed memory leaks of SCL module listening systems 74/274/2
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Wed, 18 Jan 2017 15:55:14 +0000 (17:55 +0200)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Wed, 18 Jan 2017 15:55:54 +0000 (17:55 +0200)
commit8561e498009a25473db94b0e667866aa79de90b1
tree86fb822ad36ce5f5585e719b7af38fa4464da1f4
parent657af94d0cf41efb8231e70c0f1167e75938fb16
Fixed memory leaks of SCL module listening systems

The main addition in this change are backlinks from UpdateListeners to
Observables. They make it possible to implement
UpdateListener.stopListening that removes the listener from all
Observables. This method is called automatically before the listener is
notified about the change, but client code can also call it when it
becames disinterested about changes.

Because now the client code is reposible for signaling when the
listening stops, the listeners are no more store to WeakHashMap in
ModuleEntry.

This change also contains a change in the default imports of some graph
based modules (Prelude -> StandardLibrary).

refs #6943

Change-Id: I7cf8d12b610ab22a70300d9491b645fa34dce620
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/RuntimeEnvironmentRequest.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/RuntimeEnvironmentRequest2.java
bundles/org.simantics.modeling/src/org/simantics/modeling/ComponentTypeScriptRuntimeEnvironmentRequest.java
bundles/org.simantics.modeling/src/org/simantics/modeling/scl/GraphModuleSourceRepository.java
bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/repository/ModuleRepository.java
bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/repository/UpdateListener.java
bundles/org.simantics.scl.osgi/src/org/simantics/scl/osgi/internal/BundleModuleSource.java
bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/editor2/SCLAnnotationModel.java
bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/issues/SCLIssuesContentProvider.java
bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/issues/SCLIssuesView.java