From 4eec734bc4e016775f5282271218a01a65982e86 Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Tue, 10 Nov 2015 08:29:19 +0100 Subject: [PATCH] Feeder: more efficient solution to memory leak fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The for loop copies newly created objects into the vector and destroys the original objects. The resize() instantiates the objects directly in the vector. Suggested by Nicolás Alvarez. --- sched/feeder.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sched/feeder.cpp b/sched/feeder.cpp index 2c16becbdc..8e636998a6 100644 --- a/sched/feeder.cpp +++ b/sched/feeder.cpp @@ -560,11 +560,7 @@ void feeder_loop() { // may need one enumeration per app; create vector // - for (int i=0; i