x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Does Garbage Collection handle Widgets that have been removed from it's parent?

I was comparing two floating combat text solutions from the Marketplace: Floating Combat Text and Status Effect and Combat Text

Floating Combat Text keeps an array of combat text widgets and reuses them by enabling and disabling them, and changing the Visibility.

Status Effect and Combat Text adds a combat text widget to the viewport each time it need to display new damage text, plays the animation, and sets a delay to then remove it from it's parent.

THIS ANSWER says that even after removed them from their parent, they are not removed from memory, While THIS ONE says that the garbage collector will handle it.

So, what approach should I be taking for doing floating combat texts? will the garbage collector actually remove them from memory after I remove them from their parent?

Product Version: UE 4.12
Tags:
more ▼

asked Jun 20 '16 at 05:48 PM in Using UE4

avatar image

Ghar
707 33 107 127

avatar image Narg May 06 '19 at 10:49 PM

I'm really interested in the answer to this as well !!!

avatar image Nebula Games Inc May 06 '19 at 11:16 PM

We had a long discussion about this on another thread and the answer is basically that "garbage collection" will not clear references to widgets using "remove from parent" automatically. Calling the "collect garbage" function will however remove them although I have noticed when I experimented with this months ago that it will cause a hitch (UE4 warns you of this even) if there are numerous widgets to remove at once. Point being, this is going to be a manual call to clear the widgets.

https://answers.unrealengine.com/questions/877146/floating-combat-text-and-memorywidget-destruction.html

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I had a bug occurring in a multiplayer game I am working on where a widget would sometimes not disappear on a client player's death even when removed from parent. Using the "Collect Garbage" blueprint node did indeed get rid of the lingering widget. :)

more ▼

answered Jul 25 '16 at 02:43 PM

avatar image

CometGoat
269 4 8 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question