Simplify some ownership on DilloHtml.

This commit is contained in:
2025-08-01 01:36:14 -04:00
parent 65f85a0b43
commit 252c91e6c1
2 changed files with 2 additions and 4 deletions

View File

@ -473,7 +473,7 @@ DilloHtml::DilloHtml(BrowserWindow *p_bw, const DilloUrl *url,
DocType = DT_NONE; /* assume Tag Soup 0.0! :-) */
DocTypeVersion = 0.0f;
styleEngine = new StyleEngine (HT2LT (this), page_url, base_url, bw->zoom);
styleEngine = std::make_unique< StyleEngine >(HT2LT (this), page_url, base_url, bw->zoom);
cssUrls = new misc::SimpleVector <DilloUrl*> (1);
@ -578,8 +578,6 @@ DilloHtml::~DilloHtml()
dFree(img);
}
delete (images);
delete styleEngine;
}
/**

View File

@ -188,7 +188,7 @@ public: //BUG: for now everything is public
lout::misc::SimpleVector<DilloUrl*> *cssUrls;
lout::misc::SimpleVector<DilloHtmlState> *stack;
StyleEngine *styleEngine;
std::unique_ptr< StyleEngine > styleEngine;
int InFlags; /**< tracks which elements we are in */