Search found 174 matches
- Mon Mar 11, 2019 7:27 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
Here is a sample file what I used.
- Mon Mar 11, 2019 7:18 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
This code
Produces a lot of the leaks, at least after vld.
Code: Select all
void RtfLayerNode::AddAttribute(wxString name,wxString value)
{
RtfAttributes* attr = new RtfAttributes(name, value);
m_Attrlist.Append(attr);
}
- Mon Mar 11, 2019 7:14 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
Visual Studio 2015, did you change anything else? As I did look at the source code of rtfreader.cpp, and it calls all the time new, and never delete, so actually with every new call a memory leak is created, that is why I think, that the code is not correct, and you must have changed it a bit, other...
- Mon Mar 11, 2019 6:47 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
So I again had to change the rtfreader.h, so that include rtf.h is taken out. Then it worked (Meaning your richtext file), and it also produces a lot of memory leaks. I use wxwidget 3.1.2; So it is either the missing rtf.h, question would be, why, as everything is working. or you changed something e...
- Mon Mar 11, 2019 6:35 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
and font_helper.h I also did not have.
- Mon Mar 11, 2019 6:31 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
I just remembered that in rtfreader.h I had to disable #include "rtf.h" as that was not found in my setup, do you have it. Perhaps the problem comes from there, also I did not see a problem. It works everything just is producing a lot of memory leaks. I also tried to load a file, and the same result...
- Mon Mar 11, 2019 5:40 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
m_RtfReader = new RtfReader(); Did you delete this afterwards? I found my old test code based on wx 3.1.0 and there are no leaks. delete m_RtfReader; is in onexit of the app. tried it now short after the creation with the same effect, it produces a lot of memory leaks, did you change something on y...
- Mon Mar 11, 2019 2:57 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
oneeyeman, you can have a look at it, and see if you manage to close the leaks.
I only changed everything from wxfileinputstream to wxStringinputstream as I need it different.
I only changed everything from wxfileinputstream to wxStringinputstream as I need it different.
- Mon Mar 11, 2019 2:56 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
Do you really need the RTF import in the application? Can't you do the conversion "offline" with an external tool? Anyway, I found the source code from the RTF importer i was talking about. I uploaded it here: https://www.sendspace.com/file/0uushz I just downloaded it then I implemented it into my ...
- Mon Mar 11, 2019 2:37 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
Hi, In the code above - what is the backtrace at the time of the crash? Also - maybe you can create your own implementation based on the code provided? Thank you. it is 12000 lines of code, so make the own implementation would be too much. The problem really is, that the programmer all the times ca...
- Mon Mar 11, 2019 2:30 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
Hi, Well, VLD should take care of all leaks, not just one coming from your code. Try to reduce your RTF to the bare minimum and then see about fixing the leak. Thank you. I have vld running also for the extern code, also I find where the beginning of the problem is, the fixing of it gets difficult....
- Mon Mar 11, 2019 2:27 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
Tried it, but as if I use delete (any variable, which causes the leak) I just end up in an error of the programm, tried that, and it calls by any new char of the stream the new ... so that is the problem, that by every call it generates another memory leak, so to solve that, i tried to delete it bef...
- Mon Mar 11, 2019 1:32 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
the leak depend how long the rtf text is. had now 15.255 leaks; void RtfLayerNode::AddAttribute(wxString name,wxString value) { RtfAttributes *attr = new RtfAttributes(name,value); m_Attrlist.Append(attr); delete attr; } Here the delete attr; causes the error: Unhandled unknown exception; terminatin...
- Mon Mar 11, 2019 12:59 pm
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
tried vld, my own code is also without leak, it is the external, and there are app. 1400 memory leaks, as it uses all the time new. and with a delete it generates an error, so I'm out of ideas. Even if I just make a delete before the next new call, it throughs an exception.
- Mon Mar 11, 2019 11:47 am
- Forum: C++ Development
- Topic: Rich Text Format
- Replies: 36
- Views: 1621
Re: Rich Text Format
Doublemax
Can you check for the memory leaks, by the one you uploaded for me.
Yes it works with the current wxRichtextctrl but produces a lot of memory leaks, and I find no solution how to clean those.
Can you check for the memory leaks, by the one you uploaded for me.
Yes it works with the current wxRichtextctrl but produces a lot of memory leaks, and I find no solution how to clean those.