Search found 21 matches
- Fri Jul 20, 2007 8:38 am
- Forum: C++ Development
- Topic: Crash on program close
- Replies: 25
- Views: 5171
- Thu Jul 19, 2007 5:07 pm
- Forum: C++ Development
- Topic: Crash on program close
- Replies: 25
- Views: 5171
Some functions (or the objects they belong to) take possession of the objects passed to them via pointer parameters. They are then responsible for the deletion of those objects. The problem is: you have to know how the function you are calling behaves (which can usually only be figured out by readin...
- Wed Jul 18, 2007 7:44 am
- Forum: C++ Development
- Topic: Crash on program close
- Replies: 25
- Views: 5171
Hello HighCommander4, when I tried your program, it already crashed upon startup. I was able to fix this by moving the creation of MyFrame to the application's OnInit function. It then crashed when exiting... My guess is that it has something to do with the use of shared_ptr. Probably MyFrame does n...
- Tue May 29, 2007 1:33 pm
- Forum: C++ Development
- Topic: Memory Leak?
- Replies: 12
- Views: 1902
Hi Lucky75,
this looks similar to this problem:
http://forums.wxwidgets.org/viewtopic.php?t=13208
The conclusion was, that probably the underlying runtime system keeps the memory for later allocation requests.
Maybe it is the same here?
Cheers,
Martin
this looks similar to this problem:
http://forums.wxwidgets.org/viewtopic.php?t=13208
The conclusion was, that probably the underlying runtime system keeps the memory for later allocation requests.
Maybe it is the same here?
Cheers,
Martin
- Fri Mar 30, 2007 9:37 am
- Forum: C++ Development
- Topic: wxGrid's XToCol and YToRow seem to be flawed
- Replies: 1
- Views: 708
If I set the column and row label sizes to 0, YToRow and XToCol work perfectly. //--- Create a grid ------------------------------------------------------- m_grid = new wxGrid(this, wxID_ANY); m_grid->CreateGrid(300, 8); m_grid->SetRowLabelSize(0); m_grid->SetColLabelSize(0); Does this mean that I h...
- Wed Mar 28, 2007 1:04 pm
- Forum: C++ Development
- Topic: How to detect the presence of the scrollbars on wxScrolled
- Replies: 1
- Views: 498
- Wed Mar 28, 2007 12:46 pm
- Forum: C++ Development
- Topic: wxGrid's XToCol and YToRow seem to be flawed
- Replies: 1
- Views: 708
wxGrid's XToCol and YToRow seem to be flawed
Hi folks, there (wxGTK 2.8.3) is a problem with wxGrid's XToCol and YToRow functions. They return -1 for the last column and row. (Are the row and column labels not taken into account?) And they seem to become more and more imprecise for high column/row numbers (if there are many columns/rows). The ...
- Mon Mar 19, 2007 3:48 pm
- Forum: C++ Development
- Topic: wxString memory usage question
- Replies: 8
- Views: 2117
Frank and alamgir99, I think you are right. I played around a little more with the above toy program. If I allocate hundreds of thousands of small objects, and then delete them, only a few MBs are returned to the system. If I allocate only a few hundred very large objects and then delete them, then ...
- Sat Mar 17, 2007 9:38 am
- Forum: C++ Development
- Topic: copying unsigned char array?
- Replies: 2
- Views: 1327
Just guessing here, but the length could be
wxImage::GetHeight() * wxImage::GetWidth()
I would try something like this:
How does your memcpy code look like?
wxImage::GetHeight() * wxImage::GetWidth()
I would try something like this:
Code: Select all
unsigned char* alphaCopy = new unsigned char[length];
memcpy(alphaCopy, wxImage::GetAlpha(), length);
- Sat Mar 17, 2007 8:31 am
- Forum: C++ Development
- Topic: problem with array of pointers!
- Replies: 6
- Views: 1306
- Fri Mar 16, 2007 2:43 pm
- Forum: C++ Development
- Topic: wxString memory usage question
- Replies: 8
- Views: 2117
- Fri Mar 16, 2007 2:09 pm
- Forum: C++ Development
- Topic: wxString memory usage question
- Replies: 8
- Views: 2117
Thanks for the hints.
I also tried it with
and
but to no avail...
I also tried it with
Code: Select all
vector<wxString>
Code: Select all
wxArrayString
- Fri Mar 16, 2007 11:37 am
- Forum: C++ Development
- Topic: wxString memory usage question
- Replies: 8
- Views: 2117
- Fri Mar 16, 2007 9:50 am
- Forum: C++ Development
- Topic: wxString memory usage question
- Replies: 8
- Views: 2117
wxString memory usage question
Hi there, I am writing an application that creates hundreds of thousands of wxString objects on the heap, does some computations and then deletes all these objects. Neither valgrind nor the mem_tracing-enabled debug build of wxGTK complain about memory being leaked, but the memory occupied by the pr...
- Thu Feb 22, 2007 11:51 am
- Forum: C++ Development
- Topic: Bug for wxGrid::SetTable()?
- Replies: 3
- Views: 900