---
title: "Discussion on \"Singletons in C++\" | Hashnode"
description: "Discussion on \"Singletons in C++\". Let's know what is Singletons :\nSometimes we need to have only one instance of our class for example a single DB connection shared by multiple objects as creating a separate DB connection for every object may be costly. Similarly, there can be a sing..."
url: "https://hashnode.com/posts/singletons-in-c/615b0b19e2f1936f70b29d78"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Singletons in C++](https://anshumantiwari.hashnode.dev/singletons-in-c?utm_source=hashnode&utm_medium=feed)

Let's know what is Singletons : Sometimes we need to have only one instance of our class for example a single DB connection shared by multiple objects as creating a separate DB connection for every object may be costly. Similarly, there can be a sing...

Oct 4, 2021 · 1 min read · anshumantiwari.hashnode.dev  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)

## Written by

[Anshuman Tiwari](https://hashnode.com/@anshumantiwari)

@anshumantiwari

  
[View profile](https://hashnode.com/@anshumantiwari)

Student

## Responses 1

Markdown supported · ⌘↵ to post

[Alok Verma](https://hashnode.com/@Alokv)

[Oct 5, 2021](https://hashnode.com/posts/singletons-in-c/615b0b19e2f1936f70b29d78/comment/615bbab758a5294ce01ae80a)

please add a post for lamdba functions also
