By adding print statements to the constructors, I see that only one VR3 plugin instance is getting created per outline. I also see that a new VR3 controller widget (ViewRenderedController3) is getting created every time the vr3-show command is run. So the question is, what happens to the previous instance? Leaked or GCed? I suppose the Viewrendered plugin works the same way, since the VR3 code was borrowed pretty much as is from it.
Of course, it would be better if the same widget is used when it is hidden and then shown again. I'm going to look into that. On Friday, October 2, 2020 at 12:14:47 PM UTC-4 Edward K. Ream wrote: > ... > Let me look into this. Because of undo, very little that is referenced via > any c.ivars ever gets gc'd. Hmm, I wonder whether Leo's reference chains > ever reference more than one vr widget. > > Let's take a look. The module-level (global) controllers dict contains a > reference to a ViewRenderedController3 (a QWidget) for every Commander. > That is, keys are Commanders, values are QWidget's. In effect, every > Commander has its own singleton ViewRenderedController3 widget. That seems > like it should prevent horrible leaks. > > At present, there can be multiple calls to vr3.create_base_text_widget. > I'm not sure whether this might "over-allocate" widgets, but even if so, > the extra widgets are likely to be gc'd. > > Edward > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/764b7c97-f11c-47f0-93ac-acc00132e9adn%40googlegroups.com.
