縱觀到下面的代碼片斷: //A.h
class A
{
void f();
};
//A.cpp
#include "A.h"
void A:f()
{
map<string, string> *ThisMap = new map<string, string>;
//more code (a delete will not appear)
}
我正在讀有關自動引用計數和初始化和deinitializers 和我正在做以下實用 class person
{
var first_name:String?
var last_name:String?
init(firstname name:String,lastname lastname:String