Download

[PSA] Bug for use of function local var to store temporary external reference.

I posted a bug report here with reproducible simple BP only project.
https://answers.unrealengine.com/questions/41566/bug-blueprint-function-local-var-never-de-referenc.html

It seems that when you use a local var in BP to save trace result will prevent it from ever be de-referenced, or whatever the last one your trace call hit and stored.
It might be even simpler to recreate this bug in other situation, I just use whatever I tried and make sure it’s reproducible.

So if you want to cache ‘any’ reference, it’s better to use a blueprint var instead of any localVar.

In short, do NOT do this before it’s fixed in a function.

Thanks to Michael.Schoell on answer hub, this now has a proper(?) solution.(it was still considered a bug I think.)
I’ll edit the title of thread to be resolved.