|
@@ -51,6 +51,13 @@ public:
|
|
|
// We add special null pref whose ID is 0.
|
|
// We add special null pref whose ID is 0.
|
|
|
makePref("");
|
|
makePref("");
|
|
|
}
|
|
}
|
|
|
|
|
+ ~PrefFactory()
|
|
|
|
|
+ {
|
|
|
|
|
+ for(size_t i = 0; i < count_; ++i) {
|
|
|
|
|
+ delete i2p_[i];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
size_t nextId()
|
|
size_t nextId()
|
|
|
{
|
|
{
|
|
|
return count_++;
|
|
return count_++;
|
|
@@ -117,6 +124,11 @@ const Pref* k2p(const std::string& key)
|
|
|
return getPrefFactory()->k2p(key);
|
|
return getPrefFactory()->k2p(key);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void deletePrefResource()
|
|
|
|
|
+{
|
|
|
|
|
+ delete getPrefFactory();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
} // namespace option
|
|
} // namespace option
|
|
|
|
|
|
|
|
/**
|
|
/**
|