2 ms·
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.
by mtklein 2y 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.