I try encapsulating the "storescp" into a CWinThread class,and
override the "run" function to do what the "main" fuction do in the
"storescp". It do work well. But when the application exit, the VC++
told "Detected memory leaks!".It seems that the "_ASC_Association *
assoc" and the "T_ASC_Network * net" are not free. So I add these
codes in the CWinThread::ExitInstance()fuction:
SuspendThread( );
cond = ASC_destroyAssociation(&assoc);
if (cond.bad())
{
.......
}

cond = ASC_dropNetwork(&net);
if (cond.bad())
{
.......
}

this seems work because the "net" is released, but the VC still prompt
this:
Dumping objects ->
{7040} normal block at 0x014A9758, 16924 bytes long.
Data: 4B 45 59 20 41 53 53 4F 43 49 41 54 49 4F 4E
00
{7004} normal block at 0x0152D350, 2 bytes long.
Data: < > 00 00
{7003} normal block at 0x0152C030, 2 bytes long.
Data: < > 00 00
I traced into the CWinThread::ExitInstance(), the "assoc" is really
be released!
Do anyone know what is wrong? Is there a easy way to solve this
problem?
Thank a lot for any advice!