Say I have an executable and a library on the Windows XP platform.

Does building the executable and library as static (/MT) or dynamic (/MD) have any impact on which unit creates and deletes memory on the heap? The reason for asking is that I read somewhere that if data is allocated on the heap in a library it must also be deallocated in the same library (and same for exe). Just wanted to check if this is true regardless of building options.

Cheers :-)