(mod) PositionCell in dialogue results closes dialogue window
When using PositionCell to move the player to a different result, the dialogue window gets closed. The drawback is that whatever dialogue line did this can't be read.
(in 0.41. May 04 nightly)
Ah yes, another one with an interesting history.
check if the player has changed cell (might completely invalidate any Container/NPC-Ptr the GUI still has)
There was once an idea to implement a garbage collection for MW objects (#357) that would run for example when the player leaves a cell, in order to reclaim memory for MW objects that have been deleted. Therefore, it was declared that any code holding a Ptr to instances in in-active cells should be deemed as unsafe. However, this policy was not really documented and not enforced well, and it was easy to make a mistake anyway, or run into a game mechanic that just plain required using a Ptr to an inactive cell or else have to go through ridiculous hoops.
We are now stuck with many examples of such "unsafe" code, so if we just added the GC now in the way originally intended, I am sure we would have to deal with many difficult to find crashes.
Arguably, that GC isn't really needed because we already have a "GC" that happens when you save and reload the game, and the memory for an object instance is pretty much negligble anyway. The only potential issue I could see is if a mod for some reason created and deleted new instances every single frame, but then again that's not actually resolved by just running GC on a cell change as proposed. If we were to eventually implement a way of reclaiming memory for deleted MW objects (not suggesting nor rejecting that we should), I would probably go for a safer strategy like ref-counting / SharedPtr.
This behaviour was added to fix #290. I am not sure if we will change it.
Yes, we can change it. #290 was for something that's not really relevant anymore, or never was actually.