mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibPDF: Convert PDF::Parser::m_document
from RefPtr
to WeakPtr
Otherwise both `PDF::Document` and `PDF::Parser` have a `RefPtr` pointing to each other which leads to a memory leak due to a circular dependency.
This commit is contained in:
parent
d8013f9c3a
commit
c857b5d22f
3 changed files with 8 additions and 4 deletions
|
@ -39,7 +39,7 @@ Parser::Parser(ReadonlyBytes bytes)
|
|||
{
|
||||
}
|
||||
|
||||
void Parser::set_document(RefPtr<Document> const& document)
|
||||
void Parser::set_document(WeakPtr<Document> const& document)
|
||||
{
|
||||
m_document = document;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue