Тёмный

Finding MEMORY LEAKS in C# .NET Applications 

tutorialsEU - C#
Подписаться 22 тыс.
Просмотров 27 тыс.
50% 1

🚀 C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp...
🏃‍♂️ THIS is how you can FIND MEMORY LEAKS in C# .NET Applications!
💻 Link to the Github repository! github.com/tutorialseu/csharp...
We'll make sure to make a Developer out of you in no time!
So, what is C#?
C# (pronounced "See Sharp") is a modern, object-oriented, and type-safe programming language. C# enables developers to build many types of secure and robust applications that run in .NET. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers. This tour provides an overview of the major components of the language in C# 8 and earlier. If you want to explore the language through interactive examples, try the introduction to C# tutorials.
To learn more, make sure to watch the video, and we promise you that you'll become a C# developer in no time! Have fun!
#csharp #dotnet #coding #tutorial #learn #microsoft #net #memory #memoryleaks #leaks
TAGS
dotnet,csharp,dotnet core,windows service,.net core tutorial,.net core,.net,c#,Tutorials,Tutorial,Programming,Course,Learn,Step by step,guide,programmer,core,code,c sharp,sharp,net6,6.0,memory leak,memory,leak,detective,.net framework,debugging,windbg,.net memory profiler,memory leaks net,programming,visual studio,profiling,windows 10,programming for beginners,how memory leaks occur,coding,software engineering,how to debug,debug,breakpoints
tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Stay tuned and subscribe to tutorialsEU: goo.gl/rBFh3x
Android: / @tutorialseuandroid
C#: / @tutorialseuc
Unity: / @tutorialseuunity
Facebook: / tutorialseu-1093802040...
LinkedIn: / tutorialseu
Discord: / discord

Опубликовано:

 

27 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 39   
@tutorialsEUC
@tutorialsEUC Год назад
🚀C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy
@gavinw77
@gavinw77 6 месяцев назад
@tutorialsEUC Note that the 'gcroot' command that you use here will no longer work as of 2023. They have dropped the -all option, as the tool and system are apparently fast enough now to just do -all everytime. So the correct usage is > gcroot
@bogdan98ful
@bogdan98ful 8 месяцев назад
No memory leak, just increase of used memory due to the fact of using a static list.
@UnashamedlyHentai
@UnashamedlyHentai Год назад
Unless I'm misunderstanding here, this is more "where your memory is being used." I don't see anything that I would call a leak here. Everything is intentional by virtue of that fact that statically scoped items are always in scope.
@ridgero
@ridgero Год назад
Yes, it's a "forgotten memory", but In the end this will cause a System.outofMemoryException, because memory won't be released until you will correct the code.
@user-kr9gc6ys2
@user-kr9gc6ys2 9 месяцев назад
It is really helpful guide:) Thanks for the help:)
@FranciscoAlvino
@FranciscoAlvino Год назад
Wow!! Thanks for it 👏🏻👏🏻👏🏻
@tutorialsEUC
@tutorialsEUC Год назад
You're welcome 😊
@ishaarora3
@ishaarora3 Год назад
Is it because the list is static and not collected by GC, there is having a memory leak? Could you please also explain why is there a memory leak here?
@shishlinsv
@shishlinsv Год назад
Exactly because the list is static, and it can't be collected, I think. Anyway, it's just an example.
@bhanuprakashrao1460
@bhanuprakashrao1460 10 месяцев назад
It's not a memory leak. It just unbounded memory increase. This tutorial helps in debugging such issues, which causes the memory of the application to increase over time. Its very hard to write code which leaks memory in languages like c#, since most of the code is managed. Only when you ( or the SDK you use) are not properly handling un-managed resources ( not disposing the IDisposible classes etc), do we get a memory leak and even then it is not a leak in managed code and so hard to debug using this method.
@ncvjr
@ncvjr 11 месяцев назад
Ok. In the real world application we have many threads, Lists, Arrays and probably the performance issue is not obvious like all examples about .net profiling. I need to study much more about this topic.
@rodrigoramirez3870
@rodrigoramirez3870 10 месяцев назад
Great video!
@DelMadman
@DelMadman Месяц назад
very helpful, saved my day! thanks
@user-yr9yn8yx2e
@user-yr9yn8yx2e 5 месяцев назад
I learn some new CMD, Thanks. Add the fix for such code to make it consume less memory, then compare the result, it will be more helpful.
@EdRawrDev5813
@EdRawrDev5813 2 месяца назад
Quick questions , what is the average GC heap size for a Mobile Xamarin or Maui app ? It could be any app but I'm asking about a mobile app environment?
@SDChillRide
@SDChillRide Год назад
Why my program is not showing in the monitor list?
@alexnovikov4356
@alexnovikov4356 11 месяцев назад
i know Microsoft recommends this, but all that is available in VS even in community edition. no need typing commands just using the profilers in VS.
@SakthiVel-hq6zu
@SakthiVel-hq6zu 8 месяцев назад
gcroot -all [targetid] cmd is not working
@mohitsaxena5360
@mohitsaxena5360 16 дней назад
use without -all
@hiryu70
@hiryu70 Год назад
But if I have a leak only on production environment how can I get this dump and analyze it?
@nursultanesirkegenov3289
@nursultanesirkegenov3289 6 месяцев назад
Why just don't use Memory snapshot in VS and analyze by comparing two snapshots?
@Cod3rMax
@Cod3rMax Год назад
This topic i find it very complicated, couldn't understand it 😢
@tutorialsEUC
@tutorialsEUC Год назад
hi, what exactly don't you understand? :)
@user-rv9ug9ur1x
@user-rv9ug9ur1x 3 месяца назад
my Debian can not find dotnet-counters after installing. I'm destroyed
@SakthiVel-hq6zu
@SakthiVel-hq6zu 8 месяцев назад
gcroot -all cmd is not working
@baebcbcae
@baebcbcae 8 месяцев назад
cool, but unfortunately it is not memory leak
@darkmalk94
@darkmalk94 8 месяцев назад
What do you mean?
@emmacox9506
@emmacox9506 Год назад
p͎r͎o͎m͎o͎s͎m͎ 😏
@DutchRider
@DutchRider Год назад
Such a bad practise, you can do this all within visual studio itself, no need to install more tools..
@tutorialsEUC
@tutorialsEUC Год назад
Hi, Microsoft themself suggest to use this tool for first-level performance investigation: learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters I'd not say that this is a bad practicse but an introduction into the world of performance monitoring at all. Greets, Jannick
@DutchRider
@DutchRider Год назад
@@tutorialsEUC it's very bad though, and I fully don't understand why they are doing this, while in your diagnostics window you've everything you need :) nonetheless your video is still helpfull to search what you need cuz it's basically the same steps (just saves some typing and installing tools ;))
@tutorialsEUC
@tutorialsEUC Год назад
@@DutchRider Thanks for your honest opinion! 🙂
@dellosCao
@dellosCao Год назад
still dont know how to done this in VS, Can you show me content
Далее
Writing C# without allocating ANY memory
19:36
Просмотров 145 тыс.
Finding MEMORY LEAKS in C# .NET Applications
0:51
Просмотров 7 тыс.
Diagnosing memory leaks in .NET apps
37:32
Просмотров 33 тыс.
Brutally honest advice for new .NET Web Developers
7:19
Understanding .NET C# Heaps (Deep Dive)
28:23
Просмотров 12 тыс.
The Fastest Way to Modify a List in C# | Coding Demo
10:30
5 (Extreme) Performance Tips in C#
12:26
Просмотров 73 тыс.
Don't throw exceptions in C#. Do this instead
18:13
Просмотров 254 тыс.
Diagnosing .NET memory dumps in Visual Studio 2022
18:12