Is it better to do if assigned(MyObj) then or if (MyObj <> nil) then [duplicate]

  

This question already has an answer here:

Best way to check if a Variable is nil?

2 answers

When i read the modifications made in the original delphi source code (mostly in the firemonkey) I saw that embarcadero sometime replace if assigned(MyObj) then by if (MyObj <> nil) then. Is their any real reason to do this or it’s simply purely cosmetic ?

Comments are closed.