- 博客(1)
- 资源 (9)
- 收藏
- 关注
转载 C++虚析构函数
通常,一个实现了析构函数的类型同时也需要实现拷贝构造函数与拷贝复制函数。作为一个经验法则,如果你有一个带有虚函数功能的类,则它需要一个虚析构函数,原因如下: 1. 如果一个类有虚函数功能,它经常作为一个基类使用。2.如果它是一个基类,它的派生类经常使用new来分配。3.如果一个派生类对象使用new来分配,并且通过一个指向它的基类的指针来控制,那么它经常通过一个指向它的基类的指针
2014-01-03 17:53:03 717
Using the POSIX API - Threads, real-time and IPC
In Linux, when a new process is created, it already contains a thread, used to execute the main() function
Additional threads can be created using the pthread library, which is part of the C library
Of course all threads inside a given process will share the same address space, the same set of open files, etc.
The pthread library also provide thread synchronization primitives: mutexes and conditions
This pthread library has its own header : pthread.h
Applications using pthread function calls should be explicitly linked with the pthread library
gcc o app app.c lpthread
2013-03-24
New features in Linux-2.6
虽然Linux早已到了3.8时代,但是2.6内核非常经典,在嵌入式行业依然被广泛应用。这部slides专为嵌入式开发人员而写。
2013-03-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人