somRenewNoInitNoZero - Remarks

The somRenew method creates a new instance of the receiving class by setting the appropriate location in the passed memory block to the receiving class's instance method table. Unlike somNew, these "Renew" methods use the space pointed to by memPtr rather than allocating new space for the object. The somRenew method automatically re-initializes the object by first zeroing the object's memory, and then invoking somDefaultInit; somRenewNoInit zeros memory, but does not invoke somDefaultInit. somRenewNoInitNoZero only sets the method table pointer; while somRenewNoZero calls somDefaultInit, but does not zero memory first.

No check is made to ensure that the passed pointer addresses enough space to hold an instance of the receiving class. The caller can determine the amount of space necessary by using the somGetInstanceSize method.

The C bindings produced by the SOM Compiler contain a macro that is a convenient shorthand for _somRenew(_className).


[Back: somRenewNoInitNoZero - Parameters]
[Next: somRenewNoInitNoZero - Original Class]