Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: