Skip to content

Instantly share code, notes, and snippets.

View bsneed's full-sized avatar

Brandon Sneed bsneed

View GitHub Profile
@bsneed
bsneed / singleton.swift
Created October 5, 2015 21:40 — forked from rothomp3/singleton.swift
Example of building an inheritance-friendly singleton class in Swift
#!/usr/bin/xcrun -sdk macosx swift
import Foundation
public protocol SharedInstanceType
{
init()
}
private struct TokenKey