Flyweight Pattern - DESIGN PATTERNS (C#/.NET)

Поділитися
Вставка
  • Опубліковано 28 чер 2024
  • Learn about the flyweight pattern, which is a structural design pattern that involves reusing objects to reduce memory usage. The reused object is known as the flyweight and contains immutable, intrinsic state.
    Design patterns are important for implementing object-oriented designs and adhering to SOLID principles. Understanding these fundamental patterns helps software developers build clean and maintainable applications.
    TIMESTAMPS:
    0:00 - Pattern Introduction
    0:16 - Demo Introduction
    1:02 - Memory Usage without Flyweight
    2:05 - Identifying Intrinsic State
    2:53 - Extracting Intrinsic State
    4:19 - Implementing a Flyweight Factory
    6:58 - Using the Flyweight Factory
    7:54 - Memory Usage with Flyweight
    8:27 - Flyweight Usage Tips
    9:01 - Making the Flyweight Immutable (IMPORTANT)
    9:30 - Conclusion
    SOURCE CODE: github.com/SingletonSean/desi...
    OTHER LINKS:
    Become a Member: / @singletonsean
    Donations: www.paypal.com/biz/fund?id=UB...
  • Наука та технологія

КОМЕНТАРІ • 7

  • @williamliu8985
    @williamliu8985 Рік тому +1

    Awesome, learn flyweight pattern and memory snap skill in 10 mininutes! Thanks for sharing, Sean!

  • @nickeax
    @nickeax Рік тому

    Thank you very much, I learned a lot!

  • @shashanck84
    @shashanck84 Рік тому

    Awesome stuff Sean

  • @Anecthor
    @Anecthor 2 роки тому

    Thank you Sean. Good stuff as always.

    • @SingletonSean
      @SingletonSean  2 роки тому

      Thanks Anecthor, glad this was helpful!!

  • @ashes1746
    @ashes1746 Рік тому

    i compare in my code with size = 10000000 and the Inclusive Size(Bytes) is more than origin(not using flyweightpattern) :((