Thanks alot for clearly explaining everything. Just one more thing is there a particular situation to use one way and not the other or we can use both ways (examples in my question) in any case? I think the second one uses more memeory as it creates two instances?