Search found 111 matches

by maxbld
Fri Feb 12, 2016 2:08 pm
Forum: Compiler / Linking / IDE Related
Topic: Wx lib GUI App: build it static or dynamic?
Replies: 4
Views: 1517

Re: Wx lib GUI App: build it static or dynamic?

Regardless of the memory consumption, linker issues, etc, having multiple instances of wxWidgets in the same executable is a recipe for disaster and just won't work 99% of the time unless you know exactly what you're doing. Don't do this ;) Ok, I see what you mean, but when all the libs have their ...
by maxbld
Fri Feb 12, 2016 12:46 pm
Forum: Compiler / Linking / IDE Related
Topic: Wx lib GUI App: build it static or dynamic?
Replies: 4
Views: 1517

Wx lib GUI App: build it static or dynamic?

Dear all, I've made an app that has GUI objects that are used as base classes to show a wxGrid and they're derived each time the contents of the wxGrid are different. The approach makes easier to link the wxGrid to different database tables, since each time I just have to initialize a derived class ...
by maxbld
Thu Jul 24, 2014 8:28 pm
Forum: C++ Development
Topic: false leaks in wxZipOutputStream??
Replies: 11
Views: 1877

Re: false leaks in wxZipOutputStream??

Thank you. You rock a lot. Everybody knows on this forum, but it's good to remind it every now and then! :D Anyway this means that VLD is malfunctioning for this case... I've read somewhere that VLD was more reliable than its counterpart in the CRT Debug Library, but this doesn't look the case, so I...
by maxbld
Thu Jul 24, 2014 2:10 pm
Forum: C++ Development
Topic: false leaks in wxZipOutputStream??
Replies: 11
Views: 1877

Re: false leaks in wxZipOutputStream??

Right, your code doesn't leak. but look at this one: wxZipInputStream zipIn(zipFileIn); wxZipEntry* entry; while( (entry=zipIn.GetNextEntry())!=NULL ) { //tempZipOutput.CopyEntry( entry, zipIn ); tempZipOutput.PutNextEntry(entry->GetName()); part = wxT("Test"); tempZipOutput.Write(part.mb_str(wxConv...
by maxbld
Thu Jul 24, 2014 11:40 am
Forum: C++ Development
Topic: false leaks in wxZipOutputStream??
Replies: 11
Views: 1877

Re: false leaks in wxZipOutputStream??

Thank you doublemax for your interest in my issue. Actual code is the following. There's a bit of logic to take the input and output files, then the contents of the input file (.docx) are used as a M$ word template to write a table from a recordset into a M$ word table. As you most likely know, M$ d...
by maxbld
Thu Jul 24, 2014 7:56 am
Forum: Compiler / Linking / IDE Related
Topic: Heap corruption when compiling /MT
Replies: 2
Views: 1120

Re: Heap corruption when compiling /MT

I gave up. after lots of tries I was unable to obtain on Win7 a build that would work on XP. Maybe by re-installing VS2008 to get a lower "Platform Toolset" in the VS project properties, but I'll do that only if I don't have anymore XP machines available. After all, it happened to me more than once ...
by maxbld
Thu Jul 24, 2014 7:49 am
Forum: C++ Development
Topic: false leaks in wxZipOutputStream??
Replies: 11
Views: 1877

Re: false leaks in wxZipOutputStream??

Can you try with VLD? Yes. I wanted to write it in my post, but I forgot. Codeplex VLD is clean on same code, only the memory leaks detector built in the CRT Debug Library reports leaks. I assume the latter checks the pointers only against the destructor of the wxZipInputStream that generated it. I...
by maxbld
Wed Jul 23, 2014 10:32 pm
Forum: C++ Development
Topic: false leaks in wxZipOutputStream??
Replies: 11
Views: 1877

Re: false leaks in wxZipOutputStream??

But the docs clearly say that wxZipInputStream::GetNextEntry() gives away ownership, so i would guess that you have to delete the pointer. Yes. true and that's why I say it's deleted in wxZipOutputStream::Close(). If you read the source code of zipstrm.cpp ln. 2320, you'll see that it loops the lis...
by maxbld
Wed Jul 23, 2014 5:08 pm
Forum: C++ Development
Topic: false leaks in wxZipOutputStream??
Replies: 11
Views: 1877

false leaks in wxZipOutputStream??

Dear all, If I run the code below, VS2010 memory leaks detector built in the CRT Debug Library reports leaks. If I explicitly delete all the wxZipEntry pointers I get, the leaks go away, but I fee like it's wrong: in the wxZipOutputStream::Close() method the entries are deleted and the evidence is t...
by maxbld
Mon May 19, 2014 11:34 am
Forum: Compiler / Linking / IDE Related
Topic: Heap corruption when compiling /MT
Replies: 2
Views: 1120

Heap corruption when compiling /MT

Dear all, I'm deploying a wxWidgets application using VS2010 on a Win7 machine. When I compile it and install the outcoming application on Win XP I get an error saying that msvcrt.dll is missing an entry point. That's known issue because Win7 has a different version of that library, so I've been sur...
by maxbld
Wed Mar 26, 2014 6:49 pm
Forum: C++ Development
Topic: can't alloc an array of strings...
Replies: 2
Views: 762

Re: can't alloc an array of strings...

Mh... Turns out I had to declare locally the Target variable. This way: void CUtils::CopyRows(std::wstring **Source, std::wstring ***Target, int rows){ int i; std::wstring **Row; if(rows < 1) return; Row = (std::wstring**) calloc(rows, sizeof(std::wstring*)); for (i= 0; i < rows; i++){ (Row)[i] = ne...
by maxbld
Wed Mar 26, 2014 3:44 pm
Forum: C++ Development
Topic: can't alloc an array of strings...
Replies: 2
Views: 762

can't alloc an array of strings...

Dear all, I've this piece of code and I really can't understand why does it crash when i == 1: void CUtils::CopyRows(std::wstring **Source, std::wstring ***Target, int rows){ int i; if(rows < 1) return; *Target = (std::wstring**) calloc(rows, sizeof(std::wstring*)); for (i= 0; i < rows; i++){ *(*(Ta...
by maxbld
Mon Feb 17, 2014 4:02 pm
Forum: C++ Development
Topic: wxGrid runtime diverging?
Replies: 5
Views: 1726

Re: wxGrid runtime diverging?

Well, Looks like I can close this as solved: wxGridUpdateLocker did the most of the trick, the rest was not to use wxGridCellAttr. In fact, instead than using wxGridCellAttr to store a pointer to the attributes I wanted to give to several of the cells, I could switch to evaluate it when needed, mean...
by maxbld
Fri Feb 14, 2014 6:06 pm
Forum: C++ Development
Topic: wxGrid runtime diverging?
Replies: 5
Views: 1726

Re: wxGrid runtime diverging?

Firstly I would suggest that you append all the rows you need together rather than 1 at a time, this is definitely slower than bulk appending and then filling as two separate steps. Another thing that I have read but not experimented with is the use of "freeze" and "thaw" for the control while it i...
by maxbld
Fri Feb 14, 2014 12:21 pm
Forum: C++ Development
Topic: wxGrid runtime diverging?
Replies: 5
Views: 1726

wxGrid runtime diverging?

Hi all, I'm filling a wx grid with data using basically wxGrid::AppendRows(); and wxGrid::SetCellValue. The problem being that the runtime to fill up the table diverges in a non linear way when the number of rows grows. For example in release on my PC it spends 6 sec to write 1000 rows and 13 sec to...