Sunday, May 14, 2006

Pending Note: May 1 - 15, 2006

May 8, 2006
extern function to organize global function highly related to a specific class
(http://www.accu.org/begincpp/public/disc_topics/extern.html)
1. Declare a function as an extern in .h class
2. Implement it in .cpp class

May 9, 2006
Memory leakage due to CWinThread.
Memory leakage due to newVolume method in perform method.
Circular heading file when organizing the code is very hard to find.
Constructor inheritance ( : super_class_name() ) -> http://www.ugrad.cs.ubc.ca/~cs260/chnotes/ch4/Ch4Cov02.html.

Elusive memory leakage is now known. It is from NVVolume. Its destructor does not work properly.
However, I don't know what the if structure in NVVolume.h shown below for.
After I commented it out, every thing is still okay.

for (k=0; k \lessthan m_nslices; m_pdata = 0) delete k=

May 14
Default setting for inline expansion in debug mode is disabled in VS.Net 2003. To enable it, do as follows

1. right click and invoke project properties
2Go to c++ :: General
3. Change 'Debug Information Format' to 'Program Database (/Zi)'. We cannot use 'Program Database Edit & Continue (/ZI)' because it is incompatible with inline expansion feature.
4. Go to 'C/C++ :: Optimization'.
5. Change 'Inline Function Expansion' to 'Only __inline (/Ob1)'.

May 15, 2006
A. Mysterious subnet mask problem with CSE servers.
B. Mysterious rebuild and memory leak stuff. If you found memory leak in NVKernel, perhaps, you need to rebuild each project one by one. I think it is a linking problem. Oh, maybe, I actaully need to rebuild the release version of it. :: No, just rebuild each project, except the NVKernel itself.
C. virtaul inline function: if an inline function is inherited, it's must also the virtaul function, or its implementation in a subclass will not exist and linking problem occurs.

May 16, 2006
A. OpenOffice can export large poster to PDF accurately. Even better than Adobe Acrobat!!!
B. Project dependency may not be saved in a project file. Namely, if we remove a project and add it again to our solution, dependency information will lose and we need to configure it again.

May 17, 2006
A. Do what is correct and consistent with your style, although it may not the fastest. Consistency is very important to build a reliable multi-processing software. If Big-O complexity is the same, choose straightforward and consistent style.
B. A large, tall male subject :: we do not use ' large and tall' since it means two subjects, one is tall and another is large.

No comments: