Hi sandeep,
> Hi all,
> I was using earlier using Dinkumware STL librarires in VC6.0, now while
> migrating to VC7.1 i started using MS lib ( for e.g. xtree file).
> Everything compiled fine with minor changes but now I am getting strange
> memory corruptions while using the Queue (gives access violation while
> trying to delete).
Are your allocations and deletions in the same module or are you passing
objects around different dlls or exe/dll? If so you must ensure to use the
shared dll c++ runtime in all modules so that every module is using the same
heap. Even better would be to have every module control exclusively its own
memory allocation/deallocation. So you could mix modules with different
runtime versions.
--
SvenC
[mail: swap first letters of first and family name, reverse domain]
>Hi all,
> I was using earlier using Dinkumware STL librarires in VC6.0, now while
>migrating to VC7.1 i started using MS lib ( for e.g. xtree file).
Both libs are Dinkumware, VC7.1 has a much more recent version.
> Everything compiled fine with minor changes but now I am getting strange
>memory corruptions while using the Queue (gives access violation while
>trying to delete).
Sounds like you've corrupted the heap somewhere.
> I wonder if this is a bug with MS library, or what else could be the
>problem? Does anyone faced such probelms (i saw similar one about bug in
>vector's iterator implementation.).
I doubt this is an MS bug, it is probably a bug in your code that
didn't cause a crash under VC6 (but possibly silently did something
wrong), but fortunately does cause a crash under VC7.1 (so at least
you have a hope of finding the problem).
>Can I get Dinkumware's trial STL library to see if it has any fix for such
>an issue, so that I can revert back to Dinkumware?
You can get a more recent version of Dinkumware than the one shipped
with VC7.1, but I doubt they've fixed anything in <queue> - you could
ask them (try microsoft.public.vc.stl - PJ Plauger and Pete Becker
read posts there).
Tom

Signature
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html