How can I release memory from cubemaps in an array that is used in the construction script only?

Hello there,

I have a problem that is giving me nightmares for a long time now, and still I cant find a solution…

In a blueprint I have created an** array of TextureCube** holding aprox. 100 items. The array variable is created under LocalVariables (UserConstructionScript)

In design time, the user selects one of those cube maps by entering a number in a variable (lets call it selectedCubeMap). The blueprint locates the corresponding cubemap in the array and loads it in a Dynamic Material Instance of a static mesh (again in the construction script of the blueprint).

When I run the game I get the warning that I’ve exceeded the Streaming Texture Pool limit, because I suppose all of the 100 cube maps stored in the array are getting loaded.

I’ve tried placing a Clear node for the array, followed by Garbage Collection, to unload the unused cube maps from memory, but it didn’t work. I still get the warning.

Setting the array under Variables and calling array Clear in the event graph, didnt help either…

Funny enough, the ListTexture console command does not report those cube maps.
Stat Streaming** reports the memory used by the cubemaps under Non Streaming Textures.

The most strange of all is that I get the Streaming Texture Pool limit warning even in design time. Its always on the screen. Even if I load a new level.

I have tried recreating the project from scratch. Still the same behaviour.

The project and the problem started in 4.11 and still exists in 4.12.3