So it will only deallocate the memory when you call it the next time but you never need to do this when you destroy the object? Am I understanding this correctly? If so, then why not add a function to UItemMenuF that releases the memory?
On Thu, Mar 29, 2018 at 7:36 PM, Dalai Felinto <dfeli...@gmail.com> wrote: > Hi, > > > BTW why would you leek memory by design? Have not written the garbage > collection yet or what? > > I explain it here: https://developer.blender.org/rBf167226b793e > > But basically in order to do multi-level (i.e., nested) menus with the > current code base I had to resort to uiItemMenuF. > > This function takes a callback that it is used to build the menus > on-the-fly. > In order to build the menus I need valid data of which collections to show, > so they need to be pre-allocated. > However the operator that creates the menus (and allocates the data) exits > with OPERATOR_INTERFACE. And there is no garbage collection callback > function called when the menu is destroyed. > > I guess I can also free the previously allocated memory in the operator > exec. This will leave the memory leakage to happen only when the menu is > called but dismissed. > > The leakage is small though, so I'm not super concerned. > > -- > blendernetwork.org/dalai-felinto > www.dalaifelinto.com > > 2018-03-29 14:23 GMT-03:00 Pablo Vazquez <venom...@gmail.com>: > > > On Sun, Mar 11, 2018 at 3:51 PM, Knapp <magick.c...@gmail.com> wrote: > > > What is the best link for 2.8 news? > > > > Summary: > > https://www.blender.org/2-8/ > > > > Blog: > > https://code.blender.org > > > > Social media: > > YouTube - https://www.youtube.com/BlenderDevelopers > > Twitter - https://twitter.com/BlenderDev > > Facebook - https://www.facebook.com/BlenderDevelopers > > > > > > Pablo Vazquez > > Blender Institute | Animation Studio > > pablovazquez.art > > _______________________________________________ > > Bf-committers mailing list > > Bf-committers@blender.org > > https://lists.blender.org/mailman/listinfo/bf-committers > > > _______________________________________________ > Bf-committers mailing list > Bf-committers@blender.org > https://lists.blender.org/mailman/listinfo/bf-committers > -- Douglas E Knapp, MSAOM, LAc. _______________________________________________ Bf-committers mailing list Bf-committers@blender.org https://lists.blender.org/mailman/listinfo/bf-committers