Objekte im Heap (std::string, std::vec)
-
Hi,..
wenn ich einen ptr eines Objectes nach dem erzeugen in einem seperaten Heap lege, allociert z.b. std::string neuen speicher auch in diesem oder vom ProcessHeap? (falls nicht einer neuer allocator geschrieben ist? )
std::string *strPtr =new std::string; HANDLE hEap=HeapCreate(.,.,.); std::string * strPtrArray =(std::string * )HeapAlloc(.,.,.); memcpy_s(strPtrArray+index,sizeof(*std::string),strPtr,sizeof(*std::string)); (*(strPtrArray))->reserve(200); (//here)grüüße und danke
-
Nö.
Für so was gibt es die allocator, die Du mit bei dem vector Typ angeben kannst.
-
hmm,.. shit,.. also doch,..
ok thx