Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
Singleton_V1_class_variable.rb
singleton_pattern.svg

README.md

this is exapmes of singleton pattern written in ruby.

  • Singleton_V1_class_variable
    • pro: easy to implement. instantiation when init, avoid the multi-thread synchronizing issue.
    • con: no lazy load, memory waste.

singleton pattern UML

You can’t perform that action at this time.