You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using some of the utility methods in InstanceModelUtil, it is possible to create a memory leak. Internally, InstanceModelUtil caches some computations in the static fields boundSWCache and boundBusConnections. The class also has a method clearCache() which should be called upon each run of every analysis, but sometimes isn't. If the cache is not cleared, then old instance models which are no longer used stay in the caches until OSATE terminates. For example, the class BusLoadModelBuilder, which is part of the Analyze Bus Load analysis, calls methods which populate the cache, but does not call clearCache().
After discussing this with @AaronGreenhouse and @lwrage, we think it is best to simply remove the caches boundSWCache and boundBusConnections as well as the method clearCache() from InstanceModelUtil. In this case, caching seems like an over-optimization without much benefit.
The text was updated successfully, but these errors were encountered:
When using some of the utility methods in
InstanceModelUtil
, it is possible to create a memory leak. Internally,InstanceModelUtil
caches some computations in the static fieldsboundSWCache
andboundBusConnections
. The class also has a methodclearCache()
which should be called upon each run of every analysis, but sometimes isn't. If the cache is not cleared, then old instance models which are no longer used stay in the caches until OSATE terminates. For example, the classBusLoadModelBuilder
, which is part of the Analyze Bus Load analysis, calls methods which populate the cache, but does not callclearCache()
.After discussing this with @AaronGreenhouse and @lwrage, we think it is best to simply remove the caches
boundSWCache
andboundBusConnections
as well as the methodclearCache()
fromInstanceModelUtil
. In this case, caching seems like an over-optimization without much benefit.The text was updated successfully, but these errors were encountered: