Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Design Patterns with Delphi

You're reading from   Hands-On Design Patterns with Delphi Build applications using idiomatic, extensible, and concurrent design patterns in Delphi

Arrow left icon
Product type Paperback
Published in Feb 2019
Publisher Packt
ISBN-13 9781789343243
Length 476 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Primož Gabrijelčič Primož Gabrijelčič
Author Profile Icon Primož Gabrijelčič
Primož Gabrijelčič
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Design Pattern Essentials FREE CHAPTER
2. Introduction to patterns 3. Section 2: Creational Patterns
4. Singleton, Dependency Injection, Lazy Initialization, and Object Pool 5. Factory Method, Abstract Factory, Prototype, and Builder 6. Section 3: Structural Patterns
7. Composite, Flyweight, Marker Interface, and Bridge 8. Adapter, Proxy, Decorator, and Facade 9. Section 4: Behavioral Patterns
10. Nullable Value, Template Method, Command, and State 11. Iterator, Visitor, Observer, and Memento 12. Section 5: Concurrency Patterns
13. Locking patterns 14. Thread pool, Messaging, Future and Pipeline 15. Section 6: Miscellaneous Patterns
16. Designing Delphi Programs 17. Other Kinds of Patterns 18. Other Books You May Enjoy

Object pool

The last pattern in this chapter, object pool, is again not part of the original design patterns book. Object pools as a concept appeared early in the history of OOP, but somehow the Gang of Four didn't see them as a design pattern.

Object pool functions as storage for objects. When we have an object that takes a long time to create and initialize, we sometimes don't want to spend time doing it all over again. Instead of destroying such an object, we can simply put it away in a special container: an object pool. Later, we can just ask the object pool to return the already-created object, an operation that's much faster than creating a new object.

If you have to write a letter (yes, a physical one, on paper!), you need a pen. If there is no pen in the house, you will go to the shop and buy one. Acquiring a new pen is therefore a costly operation. Because...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime