Skip to content

Instantly share code, notes, and snippets.

@robinduckett
Created August 13, 2012 13:59
Show Gist options
  • Save robinduckett/3341006 to your computer and use it in GitHub Desktop.
Save robinduckett/3341006 to your computer and use it in GitHub Desktop.
ns = {}
test = 0
class ns._Users
constructor: ->
test++
class ns.Users
_instance = undefined
@instance: () ->
_instance ?= new ns._Users()
Users = ns.Users
Users.instance()
Users.instance()
Users.instance()
Users.instance()
Users.instance()
alert(test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment