Python vs BP editor scripting memory use difference

I’m seeing a huge memory footprint when running simple loops in python (4.25) compared to the same loops in BP.
Specifically the function I’m calling in the loop is a custom BlueprintPure C++ function that pulls a value from a TArray and returns it.
It appears some data structure is getting instantiated and never freed from the size of the memory being consumed and never released (until UE is restarted).
The same function called from a BP loop uses a fraction of the memory.
Anyone have any ideas what might be happening? Is there, perhaps a known bug in 4.25 python that doesn’t free memory as it should? Thanks.