The code is this: strings = mmfx_new_array(DRC(Stringp), numStrings); VMPI_memset(strings, 0, numStrings*sizeof(DRC(Stringp))); However, mmfx_new_array runs the constructor for each array element, and the DRC (really RCPtr<T>) constructor sets the memory to zero. Ergo the memset is probably redundant (though it won't be redundant if DRC is a no-op, as it would be if refrerence counting were to be disabled).
Probably DRC() can't ever be a no-op, even if RC is disabled, precisely for this reason.
Created attachment 477625 [details] [diff] [review] Patch
Assignee: nobody → stejohns
Attachment #477625 - Flags: review?(lhansen)
Attachment #477625 - Flags: review?(lhansen) → review+
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.