To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=113604
                 Issue #|113604
                 Summary|vcl: ImplFontCharMap objects are leaked after they are
                        | removing from CharMapCacheItem[] in OutputDevice::Get
                        |FontCharMap()
               Component|gsl
                 Version|OOO310m11
                Platform|All
                     URL|
              OS/Version|All
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|pl
             Reported by|zhangjfibm





------- Additional comments from [email protected] Tue Aug  3 06:53:56 
+0000 2010 -------
BE CAUTION, This memory leak problem is not observed on MacOS, it only happens
on Windows and Linux platforms.

In api OutputDevice::GetFontCharMap(), it calls mpGraphics->GetImplFontCharMap()
to create new ImplFontCharMap objects and then put into the static
CharMapCacheItem[] array. Next time it will query if the ImplFontCharMap object
exists in the cache and reuse it if possible.  When putting a new created
ImplFontCharMap into the cache, if the cache is full then an old ImplFontCharMap
object is removed from the array. On both Windows and Linux platform, it is
observed that the removed ImplFontCharMap objects are then leaked. The leak
doesn't happen on Mac.

The root cause is that ImplFontCharMap keeps a reference count, and the
reference count is never reset to 0, so ImplFontCharMap objects are never
released.  When calling mpGraphics->GetImplFontCharMap(), the reference count of
the returned new ImplFontCharMap on Windows is 2, on Linux 1, on mac it is 1
too.   If you count into extra one reference from FontData on Windows/Mac, their
right initial value should be:
   Windows,  1
   Linux,    0
   Mac,      1

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to