0.8.19.16069 - Numerous memory/resource leak fixes, 2019 user badge and more
After two days of staring and poking through raw memory, losing sanity, summoning Cthulhu and plugging a bunch of memory leaks this build is finally ready! :smile: Has significant improvements in memory/resource usage, things should be garbage collected properly in most cases. There are some relatively drastic changes, be on a lookout for new bugs/crashes. Also a bunch of other improvements and fixes!
[h2]New Features:[/h2]
- Everyone who registered in 2019 now gets a special unique badge!
- Neos Dash now shows the specific Patreon perk as the account type
- Added extra storage for higher Patreon levels
- Added "Force Full Garbage Collection" to the debug dialog
- Added gc command to the Neos Headless to invoke immediate full garbage collection
[h2]Tweaks:[/h2]
- Built missing libmsdfgen.so for the Linux headless
- Built FreeType 2.10.0 from source for Linux for the Linux headless
- Neos will now skip attempts to initialize and connect to Emotiv Cortex service if it's not installed in the system
- Added protection against setting SimpleAvatarProtection to non-persistent (based on report by @Lewi-bean)
- Tooltip Multiplexer now properly emulates active tooltip, which fixes tooltip actions that depend on it
-- This fixes developer tooltip not being able to open inspector (reported by @CodeF53 and others (sorry I forgot who originally reported it ;_;))
- Upgraded to Unity 2019.3.0f4 (from 2019.3.0f3)
[h2]Optimizations:[/h2]
- Neos will now break up references to world on disposal of many classes, components and primitives, to allow for better/sooner garbage collection and reuse of memory
- Fixed variety of different memory leaks (thanks to @Shifty and @alex derpy avali 🐦 for providing some leads)
-- Fixed Local Slots not being properly disposed
-- Fixed Root components not being properly disposed
-- Fixed session network listener not being properly disposed
-- Fixed memory leak in background world processor, retaining references to the last background task, causing objects to not be deallocated as soon as they should or at all (if there's no more background work)
-- Fixed streams and users not being properly disposed (e.g. when user leaves or world is closed)
--- This also fixes native Opus Encoder/Decoder resource leak due to not being freed up
-- Fixed Unity connectors not always getting fully cleaned up
-- Fixed session thumbnail management from preventing world memory from being freed up
-- Fixed SyncElementBags not disposing their elements when disposed
- Fixed UserComponents not being properly disposed
- Fixed World sync members not being disposed when the world is closed
- Fixed encoding delta data of sync elements that were disposed in the meanwhile
- Fixed UserAudioStream not always unregistering audio source events
- Fixed TrackingOffsetCompensator not always unregistering input system events
- Fixed ClipboardImporter not always unregistering drag and drop event handler
- Fixed links propagating to the disposed parts of the hiearchy
- A bunch of others that I forgot to write down...
[h2]Bugfixes:[/h2]
- GET_String and POST_Strings now catch request exceptions and trigger OnError impulse, rather than logging exceptions (found in log from @Medra)
- Fixed resource leak in GET_String and POST_String LogiX nodes
- Fixed exception in updating MultiLineMesh with smooth normals on caps when there's currently just one segment (found in log from @Medra)
- Fixed error when saving worlds with nested worlds that require further processing (found in log from @Medra)
- Fixed audio events not running for all headless worlds

[h2]New Features:[/h2]
- Everyone who registered in 2019 now gets a special unique badge!
- Neos Dash now shows the specific Patreon perk as the account type
- Added extra storage for higher Patreon levels
- Added "Force Full Garbage Collection" to the debug dialog
- Added gc command to the Neos Headless to invoke immediate full garbage collection
[h2]Tweaks:[/h2]
- Built missing libmsdfgen.so for the Linux headless
- Built FreeType 2.10.0 from source for Linux for the Linux headless
- Neos will now skip attempts to initialize and connect to Emotiv Cortex service if it's not installed in the system
- Added protection against setting SimpleAvatarProtection to non-persistent (based on report by @Lewi-bean)
- Tooltip Multiplexer now properly emulates active tooltip, which fixes tooltip actions that depend on it
-- This fixes developer tooltip not being able to open inspector (reported by @CodeF53 and others (sorry I forgot who originally reported it ;_;))
- Upgraded to Unity 2019.3.0f4 (from 2019.3.0f3)
[h2]Optimizations:[/h2]
- Neos will now break up references to world on disposal of many classes, components and primitives, to allow for better/sooner garbage collection and reuse of memory
- Fixed variety of different memory leaks (thanks to @Shifty and @alex derpy avali 🐦 for providing some leads)
-- Fixed Local Slots not being properly disposed
-- Fixed Root components not being properly disposed
-- Fixed session network listener not being properly disposed
-- Fixed memory leak in background world processor, retaining references to the last background task, causing objects to not be deallocated as soon as they should or at all (if there's no more background work)
-- Fixed streams and users not being properly disposed (e.g. when user leaves or world is closed)
--- This also fixes native Opus Encoder/Decoder resource leak due to not being freed up
-- Fixed Unity connectors not always getting fully cleaned up
-- Fixed session thumbnail management from preventing world memory from being freed up
-- Fixed SyncElementBags not disposing their elements when disposed
- Fixed UserComponents not being properly disposed
- Fixed World sync members not being disposed when the world is closed
- Fixed encoding delta data of sync elements that were disposed in the meanwhile
- Fixed UserAudioStream not always unregistering audio source events
- Fixed TrackingOffsetCompensator not always unregistering input system events
- Fixed ClipboardImporter not always unregistering drag and drop event handler
- Fixed links propagating to the disposed parts of the hiearchy
- A bunch of others that I forgot to write down...
[h2]Bugfixes:[/h2]
- GET_String and POST_Strings now catch request exceptions and trigger OnError impulse, rather than logging exceptions (found in log from @Medra)
- Fixed resource leak in GET_String and POST_String LogiX nodes
- Fixed exception in updating MultiLineMesh with smooth normals on caps when there's currently just one segment (found in log from @Medra)
- Fixed error when saving worlds with nested worlds that require further processing (found in log from @Medra)
- Fixed audio events not running for all headless worlds


