Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TreeCtrl » Distorted GUI / memory leak
Re: Distorted GUI / memory leak [message #25607 is a reply to message #25583] Wed, 03 March 2010 12:04 Go to previous messageGo to previous message
galious is currently offline  galious
Messages: 28
Registered: March 2008
Promising Member
Hi,

the 'problem' with replacing Plugin by Factory was I've to use something like the following code:

One<StoragePlugin> GetPlugin(int i) {
    One<StoragePlugin> plugin = (*StorageFactory(Map()[i]))();
    return plugin;
}


this will, I think, create a new StoragePlugin object each time I iterate through the plugins. In this way I won't able to store the state in the plugin, as each invocation will return a default plugin object.

I think I've to rewrite this a bit to iterate through all factories at initialisation and create an array of plugins (by using the method shown above) and afterwards use this list, or I'll create the plugins as singletons. I'll try these possibilities tonight.

One question still stands though, why did a Button work and a TreeCtrl didn't, just coincidence?

Best regards,

Martin
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OptionTree loses check state
Next Topic: Restrict drag&drop to one level
Goto Forum:
  


Current Time: Sun May 12 00:05:12 CEST 2024

Total time taken to generate the page: 0.01615 seconds