Performing a heap allocation and deallocation every time you step to the next item is pretty bad. `LuaTable::Get()` already returns the entry by-value; I don't think you gain anything by putting it on the heap here. If you really want to retain the caching thing (rather than calling `LuaTable::Get` immediately when the iterator is incremented or decremented) then you can just keep a `bool m_dirty` flag.