Passing Activity Context to constructors to use internally - is this bad
        Posted  
        
            by jax
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by jax
        
        
        
        Published on 2010-05-26T15:44:45Z
        Indexed on 
            2010/05/26
            16:21 UTC
        
        
        Read the original article
        Hit count: 195
        
android
Is is bad practice to pass the Context to a constructor and save it as a private variable for internal use? The other option is to pass the Context as a parameter to methods that need it.
Which is the better option? I have a feeling that passing to the constructor might result in memory leaks accidentally.
© Stack Overflow or respective owner