Profile Picture

Memory Leak from NStylePreviewEditor

Posted By Mark Demory 13 Years Ago
Author
Message
Mark Demory
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 1, Visits: 1

The Text Style editor creates a new instance of class NStylePreviewEditor every time it is opened.  These objects never get cleaned up, in the example code Nevron provided with the following version:
    .NET Vision 2010.1 for VS2010 version 11.1.17.12

The NStylePreviewEditor is never properly disposed, causing a catastrophic memory leak.  We have users who need to open this editor dozens of times on one Nevron document, which causes our application to fail because all memory is consumed.

Here is the code we use to allow the user to change, for example, the default font size for a Nevron document or object:

    result = NTextStyleTypeEditor.Edit(Me.Document.Style.TextStyle, newTextStyle)


We are using VB.Net for .NET 4.0.

We used sos.dll and the following command to discover that every time a user opens the Text Style editor a new instance of this object is created, and never released:

    !dumpheap -type Nevron.Editors.NStylePreviewEditor



Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hello Mark,
Thank you for pointing out this problem, it has been fixed and the fix will be included with the next version which is expected in the next two weeks.

Please excuse us for any inconvenience.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic