Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Class singleton help
QtWS25 Last Chance

Class singleton help

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 464 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeronimo
    wrote on last edited by
    #1

    Hi i am trying to learn about this class and searching a lot of data. But i didnt get nice examples. So please if someone know one example or some site to learn about this class will be very helpful for me. Sorry a lot!

    T 1 Reply Last reply
    0
    • J Jeronimo

      Hi i am trying to learn about this class and searching a lot of data. But i didnt get nice examples. So please if someone know one example or some site to learn about this class will be very helpful for me. Sorry a lot!

      T Offline
      T Offline
      Tikani
      wrote on last edited by Tikani
      #2

      @Jeronimo Singleton is not a class, it is a pattern. There is a plenty of different techniques of realization, but, in general, typical singleton consists of a static field and a private constructor. And a public method - accessor. A set of these features guarantees that there will be only one instance of a class in memory at every moment of time. Quick googling gives a bunch of examples and articles. This, for example.

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved