Confirmed users
1,345
edits
Nnethercote (talk | contribs) |
Nnethercote (talk | contribs) No edit summary |
||
Line 79: | Line 79: | ||
Some other things to note: | Some other things to note: | ||
* Please use <tt>size_t</tt> for the sizes in functions like this. Although <tt>nsIMemoryReporter</tt> uses <tt> | * Please use <tt>size_t</tt> for the sizes in functions like this. Although <tt>nsIMemoryReporter</tt> uses <tt>int64_t</tt>, this is only because you can't use <tt>size_t</tt> in IDL. So it's best to mostly use <tt>size_t</tt> and convert to <tt>int64_t</tt> as late as possible. | ||
* You don't always need both <tt>SizeOfExcludingThis</tt> and <tt>SizeOfIncludingThis</tt>. Implement one or both as needed. If you have both, <tt>SizeOfExcludingThis</tt> is the interesting one; <tt>SizeOfIncludingThis</tt> always has the same basic form. | * You don't always need both <tt>SizeOfExcludingThis</tt> and <tt>SizeOfIncludingThis</tt>. Implement one or both as needed. If you have both, <tt>SizeOfExcludingThis</tt> is the interesting one; <tt>SizeOfIncludingThis</tt> always has the same basic form. |