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 » U++ MT-multithreading and servers » Is there a simple CGI library developed with U++?
Re: Is there a simple CGI library developed with U++? [message #23684 is a reply to message #23674] Fri, 13 November 2009 13:40 Go to previous message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
forlano wrote on Thu, 12 November 2009 11:31

Now a silly question: that library (o others) born with a "new", is it possible in principle with a simply wrapper to let disappear that operator or is it necessary to rewrite it from scratch?

Luigi


You can maybe wrap the library so you will not SEE those news, but they have to remain there unless you rewrite the actual library.

The U++ way is to hide new by either using stack space of function or NTL containers (which hide the new for programmer inside them). So by using U++ you are not that much getting rid of dynamic memory allocation, as you make it just to hide in the source, so you don't have to bother with it. And you do less mistakes.

There's no good reason to see difference in performance between U++ program and well written C++ with new (except U++ using it's own memory heap manager with more optimal new function). There can be some performance gains when you do use static memory allocated at start of program, but that's rarely worth the hassle, only for some special applications.

As always, the memory is not filled up/allocated/freed by some magic, it's done by *your* code. So *you* should know how much memory and for what you need, when you need it, and then, when you know this, you can decide what's the most optimal way to allocate it. Usually GUI applications done in U++ (the widgets are allocated on function heap and NTL containers used for lists) are close to optimal and you don't need anything else. And it's easier to write for developer, than C++ with properly used new/delete, although the final application would be as good as U++ one. Easier to develop = cheaper. Smile
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Example Hello World Client/Server Broken?
Next Topic: request: Socket working example
Goto Forum:
  


Current Time: Fri May 10 18:08:27 CEST 2024

Total time taken to generate the page: 0.02836 seconds