Code optimization - Unused methods

Posted by Yochai Timmer on Stack Overflow See other posts from Stack Overflow or by Yochai Timmer
Published on 2011-03-05T15:14:49Z Indexed on 2011/03/05 15:25 UTC
Read the original article Hit count: 254

Filed under:
|

How can I tell if a method will never be used ?

I know that for dll files and libraries you can't really know if someone else (another project) will ever use the code.

In general I assume that anything public might be used somewhere else.
But what about private methods ? Is it safe to assume that if I don't see an explicit call to that method, it won't be used ?

I assume that for private methods it's easier to decide. But is it safe to decide it ONLY for private methods ?

© Stack Overflow or respective owner

Related posts about optimization

Related posts about methods