C++ and std lib fight

After spending almost a day debugging a memory leak which drove my app to crash I found the problem was with a vector<...> variable. It was not possible to free its memory with the proper destructor var.~vector<...>it always crashed in ntdll. Does anyone know anything about it?
The fix was to use Type *a = new Type[size] and then delete [] a;
If anyone knows what I did wrong please write it down here!!