mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed memory leak by using stack memory instead of heap memory
This commit is contained in:
parent
9cb81f57ea
commit
3b2eae4f49
@ -587,9 +587,9 @@ static void optimizeHtml(QDomDocument& doc
|
||||
if (pair.length()!=2) return; //Malformed style list so a bad message or last item.
|
||||
QString keyvalue = pair.at(1);
|
||||
keyvalue.replace(";","");
|
||||
QStringList* classUsingIt = new QStringList(pair.at(0).split(','));
|
||||
QStringList classUsingIt(pair.at(0).split(','));
|
||||
QStringList* exported = new QStringList();
|
||||
foreach (QString keyVal, *classUsingIt) {
|
||||
foreach (QString keyVal, classUsingIt) {
|
||||
if(!keyVal.trimmed().isEmpty()) {
|
||||
exported->append(keyVal.trimmed().replace(".",""));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user