Announcement

Collapse
No announcement yet.

Clearing Widgets from Memory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] Clearing Widgets from Memory

    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!
    Last edited by Bolt-Action Balrog; 10-05-2016, 03:51 AM.

    #2
    They would go away with next garbage collector run. Meanwhile, why wouldn't you make your widgets to rebuild visuals when you change to weapons, etc? Any weapon its at most refference to object class with icon.

    Comment

    Working...
    X