There is a function built into CVI which is useful for tracking memory leaks. It's called CVIDynamicMemoryInfo and there is a good discussion thread about using it here:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=5065000000080000003D0F0000&ECategory=LabWindows%2FCVI
Hope that helps!
Ryan K.