Y
Hacker News
new
|
ask
|
show
|
jobs
by
mtklein
498 days ago
The idiom I am familiar with here is to make the constructor private and provide a public static factory method that allocates on the heap.