KDE Project Ships New Major Release Of Leading Open Source Desktop Environment


August 19, 2004 (The Internet) – The KDE Project is pleased to announce the immediate availability of KDE 3.3, the fourth major release of the award-winning KDE3 desktop platform. Over the past six months, hundreds of applications and desktop components have been enhanced by a community of developers, with a particular focus on integration of components.

Stephan Kulow, KDE Release Coordinator, said: “The desktop reached a quality hard to top in previous releases. Nevertheless, KDE 3.3 is a great improvement and will further strengthen KDE’s position as the leading Free desktop environment.”

Building upon previous releases, version 3.3 provides an integrated desktop and a comprehensive set of applications that make KDE the most usable and feature-rich environment of its kind. Responding to the needs of their users, KDE developers have implemented an impressive range of new features, as well as several new applications that make your desktop even more productive and pleasing to use. Of note in this release are the many integration efforts, linking applications across the desktop together to save you unecessary time and effort. Stephan Kulow added that “improvements in terms of usability, stability and integration are particularly noticeable in the KDE PIM (Personal Information Management) suite.”

Reflecting its international team and focus, KDE 3.3 is currently available in over 50 different languages. Partial translations into 30 other languages are also available, many of which are expected to be completed during the KDE 3.3 life cycle. During the past six months, Qt gained increased support for Indic languages, and languages as diverse as Farsi and Frisian were added. With 89 different languages and full localization support, no other desktop is as ready to serve the needs of today’s global community.

KDE has earned a reputation for quality and a comprehensive feature set among its global user base that is estimated to number in the millions. KDE is also proud to be the default user interface for several operating systems including Ark Linux, Conectiva, Knoppix, Linspire, Lycoris, Mandrake Linux, SUSE Linux, TurboLinux and Xandros. KDE is also available as a part of Debian, Free/Open/NetBSD, Gentoo, Libranet, Fedora, Slackware and Solaris, among others. In addition to these operating system vendors, more and more companies are offering commercial support for KDE, some of which are listed in the business directory of the KDE::Enterprise website. With the release of KDE 3.3, the KDE Project looks to enhance and grow this ecosystem of users and supporters.

Highlights At A Glance

Some of the highlights in KDE 3.3 are listed below.

  • New applications
    • Kolourpaint, an easy-to-use replacement for KPaint
    • KWordQuiz, KLatin and KTurtle expand the list of education packages for schools and families
    • Kimagemapeditor and klinkstatus make life easier for web designers
    • KSpell2, a new spellchecking library that fixes all of KSpell’s shortcomings
    • KThemeManager, a new control center module to globally handle KDE visual themes
    • The Python bindings PyQT and PyKDE are now maintained with KDE in our CVS
  • Integration of desktop components
    • Kontact is now integrated with Kolab, KDE’s groupware solution, and Kpilot
    • Konqueror features better support for Instant Messenging contacts, with the capability to send files to IM contacts, and support for IM protocols (e.g. irc://)
    • KMail can display the online presence of IM contacts
    • Kopete can display a “now listening to” message from amaroK
    • Juk has support for burning audio CDs with K3B
  • Many small desktop enhancements
    • Tab improvements in Konqueror, including scrollwheel switching
    • An RSS feed viewer sidebar in Konqueror
    • A searchbar for Konqueror, compatible with all keyword: searches
    • HTML composing, anti-spam/anti-virus wizards, automatic handling of mailing lists, improved support for cryptography and a handy quick search bar all make their way into KMail
    • Kopete gains support for file transfers with Jabber
    • Quanta Plus has a VPL (Visual Page Layout) mode to make editing even easier
    • aRts gains jack support, and aKode, a new multithreaded audio decoding/encoding library to replace mpeglib
    • KWin has new buttons to support its full features, including “always on top”
    • Over 7,000 bugs have been closed, and over 2,000 wishes have been fulfilled
    • Over 60,000 lines of code, documentation and other contributions have been committed to CVS

For a more detailed list of improvements since the KDE 3.2 release, please refer to the KDE 3.3 Feature Plan.

Getting KDE 3.3

KDE 3.3 can be downloaded over the Internet by visiting download.kde.org. Source code and vendor supplied and supported binary packages are available. KDE 3.3 will also be featured in upcoming releases of various Linux and UNIX operating systems and can be purchased separately on CD-ROM. For additional information on package availability and to read further release notes, please visit the KDE 3.3 information page.

KDE is available at no cost and all source code, art and documentation is freely available under Open Source licenses. Additional third-party KDE applications can be downloaded from kde-apps.org. KDE 3.3 is also compatible with other Linux and UNIX software packages including popular Open Source applications such as Open Office and the Mozilla web browser.

Supporting KDE

KDE is supported through voluntary contributions of time, money and resources by individuals and companies from around the world. To discover how you or your company can join in and help support KDE please visit the Supporting KDE web page. There may be more ways to support KDE than you imagine, and every bit of support helps make KDE a better project and a better product for everyone. Communicate your support today with a monetary donation, new hardware or a few hours of your time!








SelfDelete() is a simple Win API function for creating a self-deleting executable. It works by invoking the command shell as a serialized process to delete the program file.

The Command Shell

The command shell program is defined by the environment variable “COMSPEC”. This varies with the Windows OS: Win9x/ME use COMMAND.COM, while WinNT/2K/XP use CMD.EXE. The following string is passed to the command shell:

/c del Filename > nul


which translates to: “Run a single command to delete a file and redirect the output to nowhere.” Filename is the full path and name of the file we want to delete. This name needs to be converted into its short 8.3 name to change any extended characters into OEM equivalents.

The command shell is started as an independent process by calling the ShellExecuteEx() function. Its process handle is defined by the SHELLEXECUTEINFO struct member “hProcess”. NOTE: The “/c” switch is necessary for the command shell process to exit. Do not omit it from the parameters string.

Serializing Processes

Self-deletion presents us with a special problem: The main program must exit and close its opened file handle before the command shell deletes the file. To do this, we must serialize two independent, parallel processes—the current program process and the command shell process. This is done by manipulating CPU resource priorities to temporarily suppress the command shell process. As written, the code will allocate all CPU resources to the main program until it exits. This effectively blocks any command shell execution until the program has terminated.

CPU Allocation

Allocating the REALTIME_PRIORITY_CLASS and THREAD_PRIORITY_TIME_CRITICAL settings can interfere with driver functions and can cause Windows to “hang” if kept in a prolonged state. To avoid these problems, a self-deleting app must exit cleanly upon a boolean return of TRUE. Developers need to make sure all ancillary processes and threads have finished and all handles are closed before calling the function. SelfDelete() should only be called at a program’s main exit:

 INT APIENTRY WinMain(...) 
{ ... 
???// on program exit 
 // close all handles etc. 
 // add error messaging 
 return 0; // WinMain exit 

It may be desirable to use a lower CPU allocation, such as:

 SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS); SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_HIGHEST); 

This allocation does not guarantee a complete cessation of the command shell process, but nevertheless works well.

Code Limitations

  • There is no error checking if the command shell cannot delete the file. Make sure the program file is not set with a “hidden,” “system,” or “read-only” attribute.
  • The explorer shell will always remove the program icon from view regardless of whether the command shell is able to actually delete the file. Pressing F5 will update the shell folder and correct any erroneous listings.
  • The command shell can only run a single command. Multiple commands such as to delete a file and remove its directory cannot be done without a script file.


The code has been modified to work better on NT kernel computers with multiple processors. Windows allocates resources through a thread priority queue rather than by time-slicing CPU cycles. Two modifications have been made to the code:

  • The thread allocation to the program process has been increased prior to invoking the command shell process. This ensures the program process will always have priority in the resource queue. Threads created by the ShellExecuteEx function do not inherit the resource allocation of the calling process.
  • The NT kernel will transiently increase priority to whatever process is granted CPU resources. The SetProcessPriorityBoost function has been added to prevent this from happening to the command shell process.
BOOL SelfDelete() 
 TCHAR szModule [MAX_PATH], 
 szParams [MAX_PATH]; // get file path names: 
 if((GetModuleFileName(0,szModule,MAX_PATH)!=0) && 
 (GetShortPathName(szModule,szModule,MAX_PATH)!=0) && 
 // set command shell parameters 
 lstrcpy(szParams,"/c del "); 
 lstrcat(szParams, szModule); 
 lstrcat(szParams, " > nul"); // set struct members 
 sei.cbSize = sizeof(sei); 
 sei.hwnd = 0; 
 sei.lpVerb = "Open"; 
 sei.lpFile = szComspec; 
 sei.lpParameters = szParams; 
 sei.lpDirectory = 0; 
 sei.nShow = SW_HIDE; 
 sei.fMask = SEE_MASK_NOCLOSEPROCESS; // increase resource allocation to program 
 // invoke command shell 
 // suppress command shell process until program exits 
 // notify explorer shell of deletion 
 return TRUE; 
 else // if error, normalize allocation 
 return FALSE; 


Download source – 4 Kb


第一帖 一刀两断




  第二帖 一脚踢开




  第三帖 一切如梦




  第四帖 一去无踪




  第五帖 一丝不挂




  第六帖 一往无惧




  第七帖 一味沉默




  第八帖 一生一次





One of the most common questions that get asked during interviews for C++ programmers is to explain the differences between using malloc and using new. It’s also a fairly common question in some of newsgroups and C++ forums. This article will try and explain as simply as possible how malloc and new are two entities that are essentially non-interchangeable, and there is nothing is this article that you wouldn’t find in most decent C++ programming books; but the article tries to put all the information together in a single place using simple code snippets and is targeted at newbies who might be unfamiliar as to the differences.

Constructors and Destructors

When you new an object, space for the object is not only allocated but the object’s constructor is called. And similarly when you delete an object, the object’s destructor is called before the memory is released. If you use malloc and free, the destructor and constructor do not get called respectively and obviously, this simply won’t do in C++ except in certain very rare situations where you have classes without any specific destructor/constructors.

It’s very easy to test this out by using the following test class.

class Test 
??? cout << "Test : ctor\r\n"; 
??? } 
??? ~Test() 
??? { 
??? cout << "Test : dtor\r\n"; 
??? } 
??? void Hello() 
??? { 
??? cout << "Test : Hello World\r\n"; 
??? } 

Create, use and delete the object using new/delete as well as using malloc/free :-

int _tmain(int argc, _TCHAR* argv[]) 
 cout << "1\r\n"; 
 Test* t1 = new Test(); 
 delete t1; cout << "2\r\n"; 
 Test* t2 = (Test*) malloc(sizeof Test); 
 return 0; 

You’ll see the following output:-

Test : ctor 
Test : Hello World 
Test : dtor 
Test : Hello World


As obvious from the output, malloc/free did not result in either the destructor or the constructor being called.

Choosing constructor overloads

For non-array allocations, you can actually specify the specific overload of the constructor that you wish to use as in :- T t = new T(x, y, z); For array allocations using new, the default constructor will get used. If you attempt an array allocation on an object that does not have a default constructor, you get a compiler error :-

class Test2 
 Test2(int y) 
}; //... 
Test2* t2array = new Test2[10];


For example, if you attempt to compile the above snippet, you’ll get an error C2512: ‘Test2′ : no appropriate default constructor available with the VC++ 7.1 compiler.

Type-casting forced by malloc

Because malloc returns a void* the caller has to do a type-cast to get it to compile.

Test* t1 = new Test();


is so much easier to code and is a lot more readable than

Test* t2 = (Test*) malloc(sizeof Test);

Native types

For native types new/delete and malloc/free work the same way except for the need to type-cast in the case of malloc/free. So it’s just a matter of user preference.

//declaring native type 
int* i1 = new int; 
delete i1; 
int* i2 = (int*) malloc(sizeof(int)); 
//declaring native type array 
char** c1 = new char*[10]; 
delete[] c1; 
char** c2 = (char**) malloc(sizeof(char)*10); 

Safety tip

Always delete what you new, and free what you malloc, never mix new with free or malloc with delete.

The reason for this is that if you do that, then the behavior is technically undefined because there is no guarantee that new would internally use malloc, or that delete would internally use free.

Tip for scalar and vector new/delete

Thanks to Mike Dunn for referring me to Raymond Chen’s blog on this issue. The basic point is that you should not mix scalar new with vector delete and vice versa.

Test* t = new Test[3]; 
delete t; // <-- this="" is="" very="" bad="">

The above code will result in a memory leak as only the first Test object is deleted.

Test* t = new Test; 
delete[] t; // <-- this="" is="" even="" worse="">

Similarly, the above code snippet is just as bad and probably worse by a good deal. The vector delete will try to delete more objects depending on the random value it gets from its object-count location and will obviously result in heap corruption.

No realloc alternative for new/delete

The new/delete couple not have a realloc alternative that is available when you use the malloc/free pair. realloc is pretty handy if you want to resize the length of an array or a memory block dynamically, specially since the contents of the array/block remain same up to the shorter of the old and new sizes. To see this in action, see the following code snippet :-

char* p = (char*)malloc(sizeof(char)*12); 
strcpy(p,"hello world"); 
cout << p << "\r\n"; 
p = (char*)realloc(p, sizeof(char)*24); 
strcat(p," from Nish"); 
cout << p << "\r\n"; 


The output you get will be :-

hello world 
hello world from Nish

As you can see from the output, the original contents were retained. Thanks to Minox for reminding me of the realloc issue.


Please feel free to send in further information on new/delete/malloc/free so that I can enhance the article.






1、VC、VB、Delphi …… ,你该学哪个? 

想问一句:中国程序员这么多,你们真地把基础理论学好了吗?别用你现有的编程经历告诉我:编程不需要数学,不需要数据结构,不需要编译原理…… ……说话得负责任,您知道吗?我之所以发表这篇文章,就是因为再也看不下去这种在中国编程界漫延的歪理邪说了!邪教害死的是人的个体,你们害死的是中国软件业的未来!如果再让这种理论继续毒害编程新手的思想,中国将在计算机领域失去民族的尊严!!! 
请问,操作系统、编译软件、数据库系统…… 这些被称为“系统软件”的东东,中国有几样拿得出手的产品?也许是我孤陋寡闻,据我所知:我们国家一件像样的也没有。 
用他国提供的工具做几个网站,写几个应用程序,弄出几个病毒…… 是振兴不了民族软件业的。顺便说一句:我尊敬求伯君,但我不认为金山公司和其系列产品配得上被称为“民族软件业”的大旗,相对这个称号,它差得太远了。 
…… …… 
写flash软件的人会认为用flash做动画的人比他历害吗?Adobe公司真的认为考取Adobe证书的人是“人才”吗?MSCE、MSCD…… 通过这类考试得到微软徽章的人,在微软眼里是“人才”还是“义务推销员”?持这类证书以及其他一些大软件公司认证的人,你们还在以为自己是“中国软件业的精英”而感叹“怀才不遇”、工资太少吗? 
是谁说系统软件发展的黄金时代已经过去了?Linux不就是在MS操作系统雄霸多年的情况下一举成名的吗?中国难道就找不到这样一个机会? 不,如果我们的程序员克服了现在的浮燥与急功近利,我们一样可以在“系统软件”这一软件业的“高端”树立自己的品牌!所以请看下面—— 

我不赞同方东兴把微软骂得一无是处。更不赞同年轻人学他那样,一赌气而拒绝用微软的产品,拒绝Windows、拒绝VC 、拒绝IE …… 



今年是2004年,我开始上大学,到2009年毕业,Windows 2005估计与2005年发布,全面采用新的.net类库构造,从底层到界面全部都会变。没有api和sdk,有的只是被封装的更结实的,我们更难看到的.net类库。我们又被微软套牢了,我现在在想还跟着微软走吗。是不是要换一种更自由的,更可以发挥自己的环境了。喜欢一样东西就要研究他的地层,在windows下面我想以后不会在有什么,我在徘徊着想去换一种环境。我喜欢c++语言,讨厌c#,讨厌.net类库,我要转行,我要去linux底下,去接受一种更自由的,更宽松的开发方式,我喜欢那种随心所欲的境界,讨厌什么都被束缚。从现在看来linux的发展是十分的快,现在的linux已经从桌面到嵌入式系统开发,有很广阔的开发和就业环境,我想我这次的选择不会错,虽然我从开始到现在都一直拿不定我到底该去研究什么,希望这次我会确定了吧,我对linux一直都很喜欢,虽然我不会用,但是我还是喜欢把他安装了,就算是看着那蓝蓝的背景和哪个代表开放的企鹅都让人喜爱。我喜欢我喜欢的,linux和c++,我相信这条路我会走下去的。祝我成功吧!!!


今天作在电脑旁发呆,仔细想想自己好像已经很长时间没有编程了,最近总是很无聊,很懒,总是想着自己要去编程,要好好的把数学和英语学好,可是在学习的时候总是找这种或是那种接口不去学习,我想我真的该去好好的检讨一下了。我进大学的目的难道就只是为了在这个烂本科里面上完四年,然后毕业找个每月领到只能养活一个人的工资,连自己要买个新的电脑都得不吃早饭的地步吗?我想要不是这些,我有自己的梦想。我不要只是上这个本科,我要去考研究生,我要读博士。北京的学校好,我的目标是中科院软件研究所。为了自己的梦想,我要去努力,去奋斗。今天看了一下自己的任务。我是9月13开学,还有40天的时间,在这40天里面我要做的是《Thinking in C++》第一,二两卷。还有英语四级单词的第一遍复习,高中数学的全部复习一遍。我的任务还是很重的。我做了一下的任务安排:

《Thinking in C++》学习