I've ended up playing with some long range jump code using chained wormholes and have observed the same phenomenon reported by Okti.
The code fires on ship.willExitWitchSpace - spawning an entity directly in front of the player and then using entity.exitSystem(nextdestination) to create a wormhole
The result is that the player never sees the intervening systems in the jump chain - he gets a repeated tunnel effect until arrival in the final system of the chain. However Oolite's memory uses increases with every jump and never goes down, until after the final jump is complete. If there is a fair few OXP's installed with large textures etc, the game will freeze or crash part way through the jump chain.
Logging with
script.trace.javaScript = yes;
reveals that this.shipExitedWitchSpace never fires in this scenario.The alternative version spawns the entity on this.shipExitedWitchSpace. The result is the player does see each intervening sytem between jumps, and memory use rises and falls with each jump staying relatively constant overall (there is a slight increase over the course of many jumps, but no where near as dramatic as with the above version.06:40:45.567 [murphy-autojumper]: this.initialJump started with earlyjump flag:true
06:40:45.570 [murphy-autojumper]: this.jumpArray: 7,129,124,154,157,90,44,228,125,212,225,115,100,139,21,230,150,110,145,179,133,4,184,169,34,202,59,142,213,223,238,182,170,117,66 ,this.jumpArray.length: 35
06:40:45.570 [murphy-autojumper]: this.jumpFunction called with earlyjump flag:true
06:40:45.575 [murphy-autojumper]: Jump destination: 129
06:40:45.578 [murphy-autojumper]: Jump success: true
06:40:45.817 [script.trace.javaScript]: Calling [BGS-M].shipWillEnterWitchspace()
06:40:45.817 [script.trace.javaScript]: Calling [Cabal_Common_Music].shipWillEnterWitchspace()
06:40:45.817 [script.trace.javaScript]: Calling [Cabal_Common_OXPStrength].shipWillEnterWitchspace()
06:40:45.817 [script.trace.javaScript]: Calling [Cabal_Common_Comms].shipWillEnterWitchspace()
06:40:45.817 [script.trace.javaScript]: Calling [Cabal_Common_SpecialMarkets].shipWillEnterWitchspace()
06:40:45.817 [script.trace.javaScript]: Calling [oolite-nova].shipWillEnterWitchspace()
06:40:46.221 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.221 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.221 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.221 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.296 [script.trace.javaScript]: Calling [BGS-M].shipWillExitWitchspace()
06:40:46.306 [script.trace.javaScript]: Calling [murphy-autojumper].shipWillExitWitchspace()
06:40:46.306 [murphy-autojumper]: this.jumpFunction called with earlyjump flag:true
06:40:46.307 [murphy-autojumper]: Jump destination: 124
06:40:46.310 [murphy-autojumper]: Jump success: true
06:40:46.310 [script.trace.javaScript]: Calling [Cabal_Common_Music].shipWillExitWitchspace()
06:40:46.310 [script.trace.javaScript]: Calling [oolite-cloaking-device].shipWillExitWitchspace()
06:40:46.310 [script.trace.javaScript]: Calling [Cabal_Common_OXPStrength].shipWillExitWitchspace()
06:40:46.310 [script.trace.javaScript]: Calling [oolite-trumbles].shipWillExitWitchspace()
06:40:46.310 [script.trace.javaScript]: Calling [Cabal_Common_SpecialMarkets].shipWillExitWitchspace()
06:40:46.310 [script.trace.javaScript]: Calling [oolite-nova].shipWillExitWitchspace()
06:40:46.327 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.328 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.328 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.329 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.329 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.329 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.330 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.330 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.330 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:46.330 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.057 [script.trace.javaScript]: Calling [BGS-M].shipWillEnterWitchspace()
06:40:47.057 [script.trace.javaScript]: Calling [Cabal_Common_Music].shipWillEnterWitchspace()
06:40:47.057 [script.trace.javaScript]: Calling [Cabal_Common_OXPStrength].shipWillEnterWitchspace()
06:40:47.057 [script.trace.javaScript]: Calling [Cabal_Common_Comms].shipWillEnterWitchspace()
06:40:47.057 [script.trace.javaScript]: Calling [Cabal_Common_SpecialMarkets].shipWillEnterWitchspace()
06:40:47.057 [script.trace.javaScript]: Calling [oolite-nova].shipWillEnterWitchspace()
06:40:47.448 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.448 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.448 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.448 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.448 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.448 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.478 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.478 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:40:47.522 [script.trace.javaScript]: Calling [BGS-M].shipWillExitWitchspace()
06:40:47.523 [script.trace.javaScript]: Calling [murphy-autojumper].shipWillExitWitchspace()
06:40:47.523 [murphy-autojumper]: this.jumpFunction called with earlyjump flag:true
06:40:47.524 [murphy-autojumper]: Jump destination: 154
06:40:47.526 [murphy-autojumper]: Jump success: true
06:40:47.526 [script.trace.javaScript]: Calling [Cabal_Common_Music].shipWillExitWitchspace()
06:40:47.526 [script.trace.javaScript]: Calling [oolite-cloaking-device].shipWillExitWitchspace()
06:40:47.526 [script.trace.javaScript]: Calling [Cabal_Common_OXPStrength].shipWillExitWitchspace()
06:40:47.526 [script.trace.javaScript]: Calling [oolite-trumbles].shipWillExitWitchspace()
06:40:47.526 [script.trace.javaScript]: Calling [Cabal_Common_SpecialMarkets].shipWillExitWitchspace()
06:40:47.526 [script.trace.javaScript]: Calling [oolite-nova].shipWillExitWitchspace()
So it appears that doing it the first way completely bypasses memory release on exiting a system in the source code. But the gradual overall memory increase in the 2nd version suggests a small ongoing memory leak somewhere.06:45:52.027 [murphy-autojumper]: this.initialJump started with earlyjump flag:undefined
06:45:52.030 [murphy-autojumper]: this.jumpArray: 67,171,214,219,104,68,211,226,43,101,250,140,48,144,168,249,167,131,62,150,110,145,179,133,4,184,169,34,202,59,142,213,223,238,182,170,117,66 ,this.jumpArray.length: 38
06:45:52.030 [murphy-autojumper]: this.jumpFunction called with earlyjump flag:undefined
06:45:52.032 [murphy-autojumper]: Jump destination: 171
06:45:52.033 [murphy-autojumper]: Jump success: true
06:45:53.017 [script.trace.javaScript]: Calling [BGS-M].shipWillEnterWitchspace()
06:45:53.017 [script.trace.javaScript]: Calling [Cabal_Common_Music].shipWillEnterWitchspace()
06:45:53.017 [script.trace.javaScript]: Calling [Cabal_Common_OXPStrength].shipWillEnterWitchspace()
06:45:53.017 [script.trace.javaScript]: Calling [Cabal_Common_Comms].shipWillEnterWitchspace()
06:45:53.017 [script.trace.javaScript]: Calling [Cabal_Common_SpecialMarkets].shipWillEnterWitchspace()
06:45:53.017 [script.trace.javaScript]: Calling [oolite-nova].shipWillEnterWitchspace()
06:45:53.346 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.346 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.346 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.346 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.346 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.346 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.357 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.357 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.370 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.370 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.393 [script.trace.javaScript]: Calling [BGS-M].shipWillExitWitchspace()
06:45:53.398 [script.trace.javaScript]: Calling [murphy-autojumper].shipWillExitWitchspace()
06:45:53.398 [script.trace.javaScript]: Calling [Cabal_Common_Music].shipWillExitWitchspace()
06:45:53.399 [script.trace.javaScript]: Calling [oolite-cloaking-device].shipWillExitWitchspace()
06:45:53.399 [script.trace.javaScript]: Calling [Cabal_Common_OXPStrength].shipWillExitWitchspace()
06:45:53.399 [script.trace.javaScript]: Calling [oolite-trumbles].shipWillExitWitchspace()
06:45:53.399 [script.trace.javaScript]: Calling [Cabal_Common_SpecialMarkets].shipWillExitWitchspace()
06:45:53.399 [script.trace.javaScript]: Calling [oolite-nova].shipWillExitWitchspace()
06:45:53.423 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.423 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.423 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.423 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.423 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.423 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.424 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.424 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.424 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.424 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.424 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.424 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.424 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.424 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.425 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.425 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.425 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.426 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.426 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.426 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.426 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:53.426 [script.trace.javaScript]: Calling [oolite-default-ship-script].coordinatesForEscortPosition()
06:45:55.687 [script.trace.javaScript]: Calling [BGS-M].shipExitedWitchspace()
06:45:55.687 [script.trace.javaScript]: Calling [oolite-constrictor-hunt].shipExitedWitchspace()
06:45:55.687 [script.trace.javaScript]: Calling [murphy-autojumper].shipExitedWitchspace()
06:45:55.687 [murphy-autojumper]: this.jumpFunction called with earlyjump flag:undefined
06:45:55.689 [murphy-autojumper]: Jump destination: 214
06:45:55.690 [murphy-autojumper]: Jump success: true
06:45:55.690 [script.trace.javaScript]: Calling [Cabal_Common_Music].shipExitedWitchspace()
06:45:55.691 [script.trace.javaScript]: Calling [explorer_club.js].shipExitedWitchspace()
06:45:55.691 [script.trace.javaScript]: Calling [oolite-thargoid-plans].shipExitedWitchspace()
06:45:55.691 [script.trace.javaScript]: Calling [oolite-nova].shipExitedWitchspace()
06:45:55.697 [script.trace.javaScript]: Calling [Cabal_Common_Music].alertConditionChanged()
06:45:56.687 [script.trace.javaScript]: Calling [BGS-M].shipWillEnterWitchspace()
06:45:56.687 [script.trace.javaScript]: Calling [Cabal_Common_Music].shipWillEnterWitchspace()
06:45:56.687 [script.trace.javaScript]: Calling [Cabal_Common_OXPStrength].shipWillEnterWitchspace()
06:45:56.687 [script.trace.javaScript]: Calling [Cabal_Common_Comms].shipWillEnterWitchspace()
06:45:56.687 [script.trace.javaScript]: Calling [Cabal_Common_SpecialMarkets].shipWillEnterWitchspace()
06:45:56.687 [script.trace.javaScript]: Calling [oolite-nova].shipWillEnterWitchspace()
This test was done with 1.76.....I'll repeat with trunk..... edit to add - results are similar with current nightly build.