Android中的AutoMutex
摘要:在Threads.h文件中定义:1 /*2 * Automatic mutex. Declare one of these at the top of a function.3 * When the function returns, it will go out of scope, and release the4 * mutex.5 */6 7 typedef Mutex::Autolock AutoMutex;其中的Autolock: 1 // Manages the mutex automatically. It'll be locked when Autolock...
阅读全文
posted @
2013-04-19 15:36
J.evan
阅读(666)
推荐(0)
C++中的虚函数!
摘要:1 /* 2 * test.cpp 3 * 4 * Created on: 2013-4-19 5 * Author: Administrator 6 */ 7 #include <utils/RefBase.h> 8 #include <stdio.h> 9 namespace android {10 11 class A: public RefBase {12 13 };14 15 class B {16 public:17 virtual void p() {18 printf("!!!!!!!!!!!A\n");19 }20 };...
阅读全文
posted @
2013-04-19 15:29
J.evan
阅读(512)
推荐(0)