One colleague of mine has troubles during the DllMain Detach process. His bug seems not to appear in all cases, but fairly often.
While trying to help him, I kind of remembered of some usage limitations during the DllMain Attach and Detach process, but I am not sure I remember well since it was 2 year old technical discussions and it was not me working on thoses termination issues.
Namely I kind of remember that we should:
- Avoid using new and delete operator and prefer HGLOBAL memory allocation
- Avoid dealing with thread terminations here.
Could you correct me if I am wrong, explain me if ever, or point to a technical article that would deal with these issues.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…