Isn't `NativeMenuModel::getInstance(getMenuParent(g_handler->GetBrowser()))` the same for every iteration? If so, then move it outside of loop and use a variable.