Hello, I’ve developed a tab-based inventory system with a hybrid of Blueprint and C++, but I’ve run into a serious roadblock with regards to the mandatory persistence of widgets in memory. This problem can be averted in some cases, such as storing references to menus, however it is difficult to overcome with regards to fluid components within the menu itself.
In my case, when the player clicks on one of their tabs (let’s say “weapons,” or “all”) I clear all of the item buttons that exist currently and create a new one for each item in the player’s inventory that is of the/a requested type(s), leaving each dismissed button to float around in memory. At best this problem could be solved with an array of buttons that are recycled throughout inventory updates, however this is unnecessarily complicated, difficult to implement efficiently, and represents a significant drain on resources even during out-of-inventory playtime.
I’ve searched online and it appears many other devs have come into contact with a similar problem, so I would greatly appreciate the addition of an option to free widget memory!