File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ class LRUCacheTestApp final : public nbl::application_templates::MonoSystemMonoL
185185 {
186186 int * destroyCounter;
187187
188- Foo (int * _destroyCounter) : destroyCounter(_destroyCounter) {}
188+ Foo (int * _destroyCounter) : destroyCounter(_destroyCounter){}
189189
190190 void operator =(Foo&& other)
191191 {
@@ -200,14 +200,15 @@ class LRUCacheTestApp final : public nbl::application_templates::MonoSystemMonoL
200200
201201 ~Foo ()
202202 {
203+ // Only count destructions of objects resident in Cache and not ones that happen right after moving out of
203204 if (destroyCounter)
204205 (*destroyCounter)++;
205206 }
206207 };
207208
208209 int destroyCounter = 0 ;
209210 {
210- LRUCache <int , Foo> cache4 (10u );
211+ ResizableLRUCache <int , Foo> cache4 (10u );
211212 for (int i = 0 ; i < 10 ; i++)
212213 cache4.insert (i, Foo (&destroyCounter));
213214 int x = 0 ;
You can’t perform that action at this time.
0 commit comments