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
阅读(664)
推荐(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
阅读(509)
推荐(0)
C++的学习笔记
摘要:学习文章:http://blog.csdn.net/webscaler/article/details/6577429引用是什么? 引用其实就是c++中的常量指针。按照这个理解,那么c++中的引用其实就是c语言中的常量指针简化形态。status_t CalService::onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) {………………}C++引用:http://baike.baidu.com/view/2129184.htm 当大型对象被传递给函数时,使用引用参数可使参数传递效率得
阅读全文
posted @
2012-11-30 15:37
J.evan
阅读(194)
推荐(0)