diff --git a/projects/clr/hipamd/src/hip_mempool_impl.cpp b/projects/clr/hipamd/src/hip_mempool_impl.cpp index 84e8e4a526..852ce95823 100644 --- a/projects/clr/hipamd/src/hip_mempool_impl.cpp +++ b/projects/clr/hipamd/src/hip_mempool_impl.cpp @@ -122,8 +122,8 @@ bool Heap::ReleaseAllMemory(hip::Stream* stream) { // ================================================================================================ void Heap::RemoveStream(hip::Stream* stream) { - for (auto it = allocations_.begin(); it != allocations_.end();) { - it->second.safe_streams_.erase(stream); + for (auto it : allocations_) { + it.second.safe_streams_.erase(stream); } }