I discoverd a memory leak in using widget compoment.When I create a Text widget just outside the canvas panel,and use it as the userinterface for a widget.It will result memory leak.
I have created a test project to reproduce this issue.[link text][4]
The widget is like this.
In the code file ElementBatcher.cpp the draw element is not scissored in here
But in the function AddTextElement the charRect is not intersected with clipRect in here
This will result a memory leak.Hope this would help you to fix this issue.
Hello 施铭,
I have a few questions for you that will help narrow down what issue it is that you are experiencing.
Quick questions:
- Can you tell me what the memory usage starts at?
- Could you give the rate at which the memory leak raises?
- Could you tell me what the memory usage tops out at?
Thanks for your reply.
1.I think the memory are allocated in file “DrawElements.cpp”
The VertexArrayFreeList always empty, so BatchVertexArrays will allocate memory every frame and never free.
2.The rate will be 800KB~900KB per second.
3.The size of BatchVertexArrays will increase unlimited.
You can try the project which I had uploaded, and start the standalone game.It will be obvious to see the increasement of the memory.
After looking of the project that was provided I was able to reproduce this issue on our end. I have written up a report ( UE-24033) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information. Thank you for your time and information.
Make it a great day