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

Because you don't own the type?

Using another class, or struct adds up to memory usage, and turns out some C and C++ folks are itchy with such solutions, not to mention the added issue of passing wrapper classes/structs around.



If the hypothetical is: 1) you don't own the type, 2) it holds onto unmanaged resources, 3) the author didn't bother implementing IDisposable. Furthermore, 4) the unmanaged resources are publicly exposed. This seems like an extreme edge case but ok. As soon as you are done implementing it, please contact the author and ask them to implement IDisposable like every other class that holds onto unmanaged resources.


I guess it goes to prove lacking the experience of working on big corporation code, delivered by external contractors.




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

Search: