objective c - Should I initialize ALL primitive data types to 'safe' values in Obj-C? -


Is there a primitive data type that is safe to begin?

How about structs CGPoints or NSRects?

It depends on the variable where the variable is stored Language specifies that all objects on the oloc empty , Which means that all the envelopes will fill 0. For any primitive type where the banking store is going to be 0, then it is completely safe. For example:

  @interface lgdmo: nsobject {CG point point; NSRCT Rect; } @end  

After the object is allocated, it will be {0.0, 0.0} and {0.0, 0.0, 0.0, 0.0}, it clearly points to point or rect To be absolutely safe. } Respectively


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -