[Bf-committers] M Key in 2.8

Dalai Felinto dfelinto at gmail.com
Thu Mar 29 19:36:15 CEST 2018


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 <venomgfx at gmail.com>:

> On Sun, Mar 11, 2018 at 3:51 PM, Knapp <magick.crow at 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 at blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list