{"id":"polymorphic-iterators-need-heap-and-raii","text":"Polymorphic iterators require heap allocation via factory methods (CreateIterator); IteratorPtr is a stack-allocated RAII proxy that ensures proper cleanup and prevents memory leaks from forgotten deletes.","truth_value":"IN","source":"entries/2026/06/17/gof-oo-chunk-17.md","source_url":"","source_hash":"","justifications":[],"dependents":["polymorphic-iteration-bears-creational-cost-of-behavioral-abstraction"],"metadata":{"last_premise_reviewed":"2026-06-17T18:19:22","premise_review_result":"pass"},"created_at":"2026-06-17T21:30:28+00:00","updated_at":"2026-06-17T21:30:28+00:00","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"polymorphic-iterators-need-heap-and-raii","truth_value":"IN","reason":"premise"}]}}