ScopedPointer to std::unique_pointer conversion problems


As ScopedPointer has been depreciated I have attempted to move over to using std::unique_pointers as per the suggestion in the coding guidelines. However I am getting occasional heap corruption errors after I have done a simple swap in. How is the behaviour of std::unique_ptr different so that I’m getting these errors I never had before when using ScopedPointer?:

" malloc: Heap corruption detected, free list is damaged at 0x2831ca880

***** Incorrect guard value: 0**"