dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.59k stars 10.06k forks source link

Memory leakage when using 'return' during rendering logic #27429

Closed zachneu closed 3 years ago

zachneu commented 4 years ago

I have a blazor component with a loop for creating the gui based on data in some List<> There is some conditions need to be met to generate the view. The code is like @foreach(var myVar in myList) { if (myConditon == false) continue; myGui }

By a typo, i wrote "return" and not "continue" and this caused the view to never be generated and all memory on the developer machine beeing consumet by the application (59GB!)

There is no reading of new data in the foreach loop. only some linq queries on existing List<>

ghost commented 4 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

mkArtakMSFT commented 4 years ago

Thanks for contacting us. @SteveSandersonMS do you happen to remember a different issue tracking some work to prevent the bad usage of return in similar situation?

SteveSandersonMS commented 4 years ago

@mkArtakMSFT Yeah, I do faintly remember that. However I don't recall how it was phrased in the previous report, and hence haven't been successful in searching for it. Maybe we should use this issue to track that problem now.

mkArtakMSFT commented 3 years ago

Hi. Thanks for contacting us. We're closing this issue as there was not much community interest in this ask for quite a while now. You can learn more about our triage process and how we handle issues by reading our Triage Process writeup.