Garbage Collection [An Introduction in .NET 5.0]

Поділитися
Вставка
  • Опубліковано 31 січ 2025

КОМЕНТАРІ • 27

  • @DotNetCoreCentral
    @DotNetCoreCentral  4 роки тому +9

    In this video, I have misspoken a couple of times:
    At 05:10​ I mentioned "three different classes", which should have been "three different objects"
    At 10:47​ I mentioned "unmanaged method" which should have been "unmanaged objects"

  • @kumar_codes
    @kumar_codes 4 роки тому +2

    Your videos are very helpful keep making just like this...The content in it is very good..

  • @spencer_mayne
    @spencer_mayne 3 роки тому

    Really well explained. Great video

  • @littlebearjeremy
    @littlebearjeremy 3 роки тому

    Nice video. well done

  • @shrikantmule9812
    @shrikantmule9812 3 роки тому

    Great video 👍🏻

  • @mahendranchinnaiah7593
    @mahendranchinnaiah7593 4 роки тому

    Thank you

  • @sidranoor6891
    @sidranoor6891 3 роки тому

    is there any website or blog of yours on this topic ?
    can your share the link

    • @DotNetCoreCentral
      @DotNetCoreCentral  3 роки тому

      @SIDRA NOOR, thanks for watching! My blog site URL is dotnetcorecentral.com/, though I do not have this captured in my blog yet, I have other topics there if you want to check out.

  • @saurabhchauhan232
    @saurabhchauhan232 4 роки тому

    Thank you !
    Question: In .net core DI, we register Transient, Singleton, Scoped. Creating transient and scoped isn't adding additional burden on GC? though singleton is not good option either but this really confuse me, can you please answer if you can?

    • @DotNetCoreCentral
      @DotNetCoreCentral  4 роки тому

      @Saurabh Chauhan, thanks for watching the video!
      Singleton is not necessarily a bad thing if it is done through DI, the reason the singleton design pattern was drawn upon was because of the fact that it was harder to test. But if you use it through DI, that argument is not valid anymore. There are definitely cases for using a singleton, especially if there is no state managed inside the object.
      Now in terms of transient and scoped usage, well technically they might cause GC to run more often compared to everything being singleton, but there are cases for using these as well. I will not be too concerned about GC running multiple times, especially in the days of microservices where services are small.
      But if you are using a monolithic application, there should be some consideration given for this situation. In which case, you should debate about which all classes make sense making singleton vs not.
      Let me know if it makes sense. Thanks

    • @saurabhchauhan232
      @saurabhchauhan232 4 роки тому

      @@DotNetCoreCentral Yes this make sense but that's where my concern is with Monolith, what should be the prime consideration to decide which service should be scoped vs transient vs singleton

    • @DotNetCoreCentral
      @DotNetCoreCentral  4 роки тому

      @@saurabhchauhan232 As long as the object does not maintain any state, meaning it does not have any concern of multi-thread contention issues, it can be a singleton. Or it really needs to be singleton due to business needs, and need to manage state, in which case you need to care for thread contention.
      In other cases, it can be transient.

    • @saurabhchauhan232
      @saurabhchauhan232 4 роки тому

      @@DotNetCoreCentral Thank you for your reply, Sorry but what I have understood so faf is singleton is for managing state and transient is something that has nothing to do with state

    • @DotNetCoreCentral
      @DotNetCoreCentral  4 роки тому

      @@saurabhchauhan232 I am planning to create a new video on this, hopefully, that should answer your questions.

  • @KoScosss
    @KoScosss 4 роки тому +1

    Time to rename channel xd

    • @DotNetCoreCentral
      @DotNetCoreCentral  4 роки тому +1

      @KoScosss, thanks for watching! And yes, I will have to think about the name :)

  • @nareshtalluri2027
    @nareshtalluri2027 3 роки тому

    Types of garbage collection