{"id":100087,"date":"2026-09-03T22:01:02","date_gmt":"2026-09-03T14:01:02","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/100087.html"},"modified":"2026-09-03T22:01:02","modified_gmt":"2026-09-03T14:01:02","slug":"%e5%86%85%e5%ad%98%e5%88%86%e5%8c%ba%e4%b8%8enew","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/100087.html","title":{"rendered":"\u5185\u5b58\u5206\u533a\u4e0enew"},"content":{"rendered":"<h3>1. C&#043;&#043;\u5185\u5b58\u5206\u533a\u6a21\u578b<\/h3>\n<p>C&#043;&#043;\u7a0b\u5e8f\u8fd0\u884c\u65f6&#xff0c;\u5185\u5b58\u901a\u5e38\u88ab\u5212\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u533a\u57df&#xff1a;<\/p>\n<table>\n<tr>\u5206\u533a\u5b58\u653e\u5185\u5bb9\u751f\u547d\u5468\u671f\u7ba1\u7406\u65b9\u5f0f<\/tr>\n<tbody>\n<tr>\n<td>\u4ee3\u7801\u533a<\/td>\n<td>\u7f16\u8bd1\u540e\u7684\u4e8c\u8fdb\u5236\u4ee3\u7801&#xff08;\u51fd\u6570\u4f53\u3001\u53ea\u8bfb\u5e38\u91cf&#xff09;<\/td>\n<td>\u7a0b\u5e8f\u8fd0\u884c\u671f<\/td>\n<td>\u64cd\u4f5c\u7cfb\u7edf\u7ba1\u7406<\/td>\n<\/tr>\n<tr>\n<td>\u5168\u5c40\/\u9759\u6001\u5b58\u50a8\u533a<\/td>\n<td>\u5168\u5c40\u53d8\u91cf\u3001\u9759\u6001\u53d8\u91cf\u3001\u5e38\u91cf&#xff08;const\u5168\u5c40&#xff09;<\/td>\n<td>\u7a0b\u5e8f\u8fd0\u884c\u671f<\/td>\n<td>\u7f16\u8bd1\u65f6\u5206\u914d&#xff0c;\u81ea\u52a8\u91ca\u653e<\/td>\n<\/tr>\n<tr>\n<td>\u6808\u533a<\/td>\n<td>\u5c40\u90e8\u53d8\u91cf\u3001\u51fd\u6570\u53c2\u6570\u3001\u8fd4\u56de\u5730\u5740\u7b49<\/td>\n<td>\u51fd\u6570\u8c03\u7528\u671f\u95f4<\/td>\n<td>\u7f16\u8bd1\u5668\u81ea\u52a8\u7ba1\u7406<\/td>\n<\/tr>\n<tr>\n<td>\u5806\u533a<\/td>\n<td>\u52a8\u6001\u5206\u914d\u7684\u5185\u5b58&#xff08;new\/malloc&#xff09;<\/td>\n<td>\u7531\u7a0b\u5e8f\u5458\u63a7\u5236<\/td>\n<td>\u7a0b\u5e8f\u5458\u624b\u52a8\u5206\u914d\u548c\u91ca\u653e<\/td>\n<\/tr>\n<tr>\n<td>\u5e38\u91cf\u533a&#xff08;\u5728\u5168\u5c40\u533a\u4e2d&#xff09;<\/td>\n<td>\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\u3001const\u4fee\u9970\u7684\u5168\u5c40\u5e38\u91cf<\/td>\n<td>\u7a0b\u5e8f\u8fd0\u884c\u671f<\/td>\n<td>\u53ea\u8bfb&#xff0c;\u4e0d\u53ef\u4fee\u6539<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>1.1 \u4ee3\u7801\u533a<\/h4>\n<p>\u5b58\u653eCPU\u6267\u884c\u7684\u673a\u5668\u6307\u4ee4&#xff0c;\u901a\u5e38\u4e3a\u53ea\u8bfb&#xff0c;\u9632\u6b62\u7a0b\u5e8f\u610f\u5916\u4fee\u6539\u3002\u51fd\u6570\u4f53\u7684\u4e8c\u8fdb\u5236\u4ee3\u7801\u5c31\u5b58\u653e\u5728\u8fd9\u91cc\u3002<\/p>\n<p>\u4ee3\u7801\u533a\u662f\u5171\u4eab\u548c\u5171\u8bfb\u7684\u3002<\/p>\n<p><span style=\"color:#fe2c24\">\u4ee3\u7801\u533a\u662f\u5171\u4eab\u7684&#xff0c;\u5171\u4eab\u7684\u76ee\u7684\u662f\u5f53\u591a\u8fdb\u7a0b\u8fd0\u884c\u540c\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u65f6&#xff08;\u4f8b\u5982\u591a\u7528\u6237\u540c\u65f6\u8fd0\u884c\u540c\u4e00\u4e2a\u7a0b\u5e8f&#xff0c;\u6216\u540c\u4e00\u4e2a\u7a0b\u5e8f\u88ab\u591a\u6b21\u542f\u52a8&#xff09;&#xff0c;\u64cd\u4f5c\u7cfb\u7edf\u53ea\u9700\u8981\u5728\u7269\u7406\u5185\u5b58\u4e2d\u52a0\u8f7d\u4e00\u4efd\u4ee3\u7801&#xff0c;\u7136\u540e\u8ba9\u591a\u4e2a\u8fdb\u7a0b\u7684\u865a\u62df\u5730\u5740\u7a7a\u95f4\u6620\u5c04\u5230\u540c\u4e00\u4efd\u7269\u7406\u4ee3\u7801\u9875\u4e0a\u3002<\/span><\/p>\n<p>\u597d\u5904&#xff1a;<\/p>\n<p>1.\u8282\u7701\u5185\u5b58&#xff0c;\u907f\u514d\u52a0\u8f7d\u76f8\u540c\u4ee3\u7801\u6d6a\u8d39\u7269\u7406\u7a7a\u95f4\u3002<\/p>\n<p>2.\u63d0\u9ad8\u6548\u7387&#xff1a;\u51cf\u5c11\u78c1\u76d8I\/O\u548c\u5185\u5b58\u5360\u7528\u3002<\/p>\n<p><span style=\"color:#ff9900\">\u6ce8\u610f&#xff1a;\u8fd9\u79cd\u5171\u4eab\u662f\u53ea\u8bfb\u7684\u5171\u4eab&#xff0c;\u4ee3\u7801\u662f\u53ea\u8bfb\u7684&#xff0c;\u4efb\u4f55\u8fdb\u7a0b\u4e0d\u80fd\u4fee\u6539\u5b83&#xff0c;\u5426\u5219\u4f1a\u7834\u574f\u5176\u4ed6\u8fdb\u7a0b\u7684\u6267\u884c<\/span><\/p>\n<h4>1.2 \u5168\u5c40\/\u9759\u6001\u5b58\u50a8\u533a&#xff08;\u5305\u542b\u5e38\u91cf\u533a&#xff09;<\/h4>\n<ul>\n<li>\n<p>\u5168\u5c40\u53d8\u91cf&#xff08;\u5728\u6240\u6709\u51fd\u6570\u5916\u5b9a\u4e49&#xff09;<\/p>\n<\/li>\n<li>\n<p>static\u4fee\u9970\u7684\u53d8\u91cf&#xff08;\u65e0\u8bba\u662f\u5168\u5c40\u8fd8\u662f\u5c40\u90e8&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u5df2\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf\u548c\u672a\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf\u5206\u5c5e\u4e24\u4e2a\u76f8\u90bb\u533a\u57df&#xff08;.data\u548c.bss\u6bb5&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u751f\u547d\u5468\u671f\u4ece\u7a0b\u5e8f\u5f00\u59cb\u5230\u7ed3\u675f\u3002<\/p>\n<\/li>\n<li>\n<p>\u8be5\u533a\u57df\u7684\u6570\u636e\u5728\u7a0b\u5e8f\u7ed3\u675f\u540e\u7531\u64cd\u4f5c\u7cfb\u7edf\u91ca\u653e\u3002<\/p>\n<\/li>\n<li>\n<p>\u8be5\u533a\u57df\u8fd8\u5305\u542b\u5e38\u91cf\u533a&#xff0c;\u5b57\u7b26\u4e32\u5e38\u91cf\u548c\u5176\u4ed6\u5e38\u91cf\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u793a\u4f8b&#xff1a;<\/p>\n<p>int globalVar &#061; 10;        \/\/ .data \u6bb5<br \/>\nstatic int staticVar &#061; 20; \/\/ .data \u6bb5<br \/>\nint uninitGlobal;          \/\/ .bss \u6bb5&#xff0c;\u81ea\u52a8\u521d\u59cb\u5316\u4e3a0<\/p>\n<h4>1.3 \u6808\u533a<\/h4>\n<p>\u7531\u7f16\u8bd1\u5668\u81ea\u52a8\u5206\u914d\u91ca\u653e&#xff0c;\u5b58\u653e\u51fd\u6570\u7684\u53c2\u6570\u503c\u3001\u5c40\u90e8\u53d8\u91cf\u7b49\u3002\u6808\u5185\u5b58\u5206\u914d\u901f\u5ea6\u5feb&#xff0c;\u4f46\u7a7a\u95f4\u6709\u9650&#xff08;\u901a\u5e38\u51e0MB&#xff09;\u3002\u51fd\u6570\u8c03\u7528\u65f6&#xff0c;\u53c2\u6570\u548c\u5c40\u90e8\u53d8\u91cf\u538b\u6808&#xff0c;\u51fd\u6570\u8fd4\u56de\u65f6\u51fa\u6808\u3002<\/p>\n<p>\u6ce8\u610f&#xff1a;\u4e0d\u8fd4\u56de\u5c40\u90e8\u53d8\u91cf\u7684\u5730\u5740&#xff0c;\u6808\u533a\u5f00\u8f9f\u7684\u6570\u636e\u7531\u7f16\u8bd1\u5668\u81ea\u52a8\u91ca\u653e<\/p>\n<p>\u5c40\u90e8\u53d8\u91cf\u5b58\u653e\u5728\u6808\u533a&#xff0c;\u6808\u533a\u6570\u636e\u5728\u51fd\u6570\u6267\u884c\u5b8c\u540e\u81ea\u52a8\u91ca\u653e<\/p>\n<p>#include &lt;iostream&gt;<br \/>\nusing namespace std;<br \/>\nvoid func()<br \/>\n{<br \/>\nint a &#061; 10; \/\/\u5728\u6808\u533a&#xff0c;\u6267\u884c\u540e\u81ea\u52a8\u91ca\u653e<br \/>\nreturn &amp;a;\/\/\u8fd4\u56de\u5730\u5740<br \/>\n}<br \/>\nint main()<br \/>\n{<br \/>\ncout &lt;&lt; &#034;1&#034; &lt;&lt; endl;<br \/>\nint* p &#061; func();<br \/>\ncout &lt;&lt; *p &lt;&lt; endl;<br \/>\ncout &lt;&lt; *p &lt;&lt; endl;<br \/>\nsystem(&#034;pause&#034;);<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p>\u7ed3\u679c&#xff1a;<span style=\"color:#fe2c24\">\u4e71\u7801&#xff0c;\u62a5\u9519<\/span><\/p>\n<p style=\"text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"230\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260903140101-6a997d9d871e9.png\" width=\"253\" \/><\/p>\n<p>\u793a\u4f8b&#xff1a;<\/p>\n<p>void func() {<br \/>\n    int a &#061; 5;      \/\/ \u6808\u4e0a\u5206\u914d<br \/>\n    char buf[100];  \/\/ \u6808\u4e0a\u6570\u7ec4<br \/>\n}<\/p>\n<h4>1.4 \u5806\u533a<\/h4>\n<p>\u7531\u7a0b\u5e8f\u5458\u663e\u5f0f\u5206\u914d\u548c\u91ca\u653e&#xff08;new\/delete\u6216malloc\/free&#xff09;\u3002\u82e5\u672a\u91ca\u653e&#xff0c;\u7a0b\u5e8f\u7ed3\u675f\u65f6\u53ef\u80fd\u7531\u64cd\u4f5c\u7cfb\u7edf\u56de\u6536&#xff0c;\u4f46\u957f\u671f\u8fd0\u884c\u7684\u7a0b\u5e8f\u4f1a\u5185\u5b58\u6cc4\u6f0f\u3002\u5806\u7a7a\u95f4\u5927&#xff0c;\u4f46\u5206\u914d\u548c\u91ca\u653e\u8f83\u6162&#xff0c;\u53ef\u80fd\u4ea7\u751f\u5185\u5b58\u788e\u7247\u3002<\/p>\n<p>\u6808\u533a\u5373\u4f7f\u6709\u6570\u636e\u5730\u5740&#xff0c;\u6570\u636e\u672c\u8eab\u4e5f\u88ab\u91ca\u653e\u4e86&#xff0c;\u4e0d\u80fd\u4f7f\u7528&#xff1a;\u800c\u5806\u533a\u7684\u6570\u636e\u4e0d\u4f1a\u88ab\u81ea\u52a8\u91ca\u653e&#xff0c;\u56e0\u6b64\u6307\u9488\u6307\u5411\u7684\u6570\u636e\u53ef\u4ee5\u88ab\u89e3\u5f15\u7528<\/p>\n<p>\u5806\u533a\u7684\u6570\u636e\u4e0d\u80fd\u901a\u8fc7\u53d8\u91cf\u76f4\u63a5\u8bbf\u95ee&#xff0c;\u53ea\u80fd\u901a\u8fc7\u6307\u9488\u95f4\u63a5\u8bbf\u95ee<\/p>\n<h4>2.5 \u5e38\u91cf\u533a<\/h4>\n<p>\u5b58\u653e\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\u548cconst\u4fee\u9970\u7684\u5168\u5c40\u5e38\u91cf\u3002\u8be5\u533a\u57df\u53ea\u8bfb&#xff0c;\u4fee\u6539\u4f1a\u5bfc\u81f4\u672a\u5b9a\u4e49\u884c\u4e3a&#xff08;\u901a\u5e38\u6bb5\u9519\u8bef&#xff09;\u3002<\/p>\n<p>\u793a\u4f8b&#xff1a;<\/p>\n<p>const char* p &#061; &#034;hello&#034;; \/\/ &#034;hello&#034;\u5b58\u50a8\u5728\u5e38\u91cf\u533a&#xff0c;p\u6307\u5411\u5b83<br \/>\nchar* q &#061; &#034;world&#034;;       \/\/ \u5371\u9669&#xff1a;\u4fee\u6539*q\u4f1a\u5d29\u6e83&#xff0c;\u5e94\u4f7f\u7528const char*<\/p>\n<h3>2. new\/delete\u64cd\u4f5c\u7b26\u6df1\u5165\u89e3\u6790<\/h3>\n<p>new\u548cdelete\u662fC&#043;&#043;\u4e2d\u7528\u4e8e\u52a8\u6001\u5185\u5b58\u7ba1\u7406\u7684\u64cd\u4f5c\u7b26&#xff0c;\u5b83\u4eec\u4e0d\u4ec5\u5206\u914d\u5185\u5b58&#xff0c;\u8fd8\u4f1a\u8c03\u7528\u5bf9\u8c61\u7684\u6784\u9020\u51fd\u6570\u548c\u6790\u6784\u51fd\u6570\u3002<\/p>\n<h4>2.1 new\u7684\u4e09\u79cd\u7528\u6cd5<\/h4>\n<h5>(1) \u5206\u914d\u5355\u4e2a\u5bf9\u8c61<\/h5>\n<p>int* p &#061; new int;        \/\/ \u672a\u521d\u59cb\u5316<br \/>\nint* q &#061; new int(10);    \/\/ \u521d\u59cb\u5316\u4e3a10<br \/>\nMyClass* obj &#061; new MyClass; \/\/ \u8c03\u7528\u9ed8\u8ba4\u6784\u9020\u51fd\u6570<\/p>\n<h5>(2) \u5206\u914d\u6570\u7ec4<\/h5>\n<p>int* arr &#061; new int[100];      \/\/ \u672a\u521d\u59cb\u5316<br \/>\nMyClass* objs &#061; new MyClass[10]; \/\/ \u8c03\u752810\u6b21\u9ed8\u8ba4\u6784\u9020\u51fd\u6570<\/p>\n<h5>(3) \u5b9a\u4f4dnew&#xff08;placement new&#xff09;<\/h5>\n<p>\u5728\u5df2\u5206\u914d\u7684\u5185\u5b58\u4e0a\u6784\u9020\u5bf9\u8c61&#xff0c;\u4e0d\u5206\u914d\u65b0\u5185\u5b58\u3002<\/p>\n<p>#include &lt;new&gt;<br \/>\nchar buffer[sizeof(MyClass)];<br \/>\nMyClass* p &#061; new (buffer) MyClass; \/\/ \u5728buffer\u4e0a\u6784\u9020\u5bf9\u8c61<\/p>\n<h4>2.2 new\u7684\u5185\u90e8\u5b9e\u73b0\u6d41\u7a0b<\/h4>\n<p>\u5bf9\u4e8enew T&#xff08;T\u4e3a\u7c7b\u578b&#xff09;&#xff0c;\u7f16\u8bd1\u5668\u5927\u81f4\u8f6c\u6362\u4e3a\u4ee5\u4e0b\u6b65\u9aa4&#xff1a;<\/p>\n<li>\n<p>\u8c03\u7528operator new(sizeof(T))\u5206\u914d\u539f\u59cb\u5185\u5b58&#xff08;\u5185\u90e8\u901a\u5e38\u8c03\u7528malloc&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u82e5\u5206\u914d\u6210\u529f&#xff0c;\u5728\u83b7\u5f97\u7684\u5185\u5b58\u4e0a\u8c03\u7528T\u7684\u6784\u9020\u51fd\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u8fd4\u56de\u6307\u5411\u8be5\u5bf9\u8c61\u7684\u6307\u9488\u3002<\/p>\n<\/li>\n<p>\u5bf9\u4e8enew T[n]&#xff1a;<\/p>\n<li>\n<p>\u8c03\u7528operator new[](sizeof(T) * n &#043; \u989d\u5916\u7a7a\u95f4)&#xff0c;\u989d\u5916\u7a7a\u95f4\u901a\u5e38\u7528\u4e8e\u5b58\u50a8\u6570\u7ec4\u5143\u7d20\u4e2a\u6570&#xff08;\u4ee5\u4fbfdelete[]\u77e5\u9053\u8c03\u7528\u591a\u5c11\u6b21\u6790\u6784\u51fd\u6570&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f9d\u6b21\u8c03\u7528\u6bcf\u4e2a\u5143\u7d20\u7684\u6784\u9020\u51fd\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u8fd4\u56de\u6307\u5411\u7b2c\u4e00\u4e2a\u5143\u7d20\u7684\u6307\u9488\u3002<\/p>\n<\/li>\n<p>operator new\u53ef\u4ee5\u88ab\u91cd\u8f7d&#xff0c;\u63d0\u4f9b\u81ea\u5b9a\u4e49\u7684\u5185\u5b58\u5206\u914d\u7b56\u7565\u3002<\/p>\n<h4>2.3 delete\u7684\u5185\u90e8\u5b9e\u73b0\u6d41\u7a0b<\/h4>\n<p>\u5bf9\u4e8edelete p&#xff1a;<\/p>\n<li>\n<p>\u8c03\u7528p\u6240\u6307\u5411\u5bf9\u8c61\u7684\u6790\u6784\u51fd\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u8c03\u7528operator delete(p)\u91ca\u653e\u5185\u5b58&#xff08;\u5185\u90e8\u901a\u5e38\u8c03\u7528free&#xff09;\u3002<\/p>\n<\/li>\n<p>\u5bf9\u4e8edelete[] p&#xff1a;<\/p>\n<li>\n<p>\u6839\u636e\u5b58\u50a8\u7684\u5143\u7d20\u4e2a\u6570&#xff0c;\u9006\u5e8f\u8c03\u7528\u6bcf\u4e2a\u5143\u7d20\u7684\u6790\u6784\u51fd\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u8c03\u7528operator delete[]\u91ca\u653e\u5185\u5b58\u3002<\/p>\n<\/li>\n<h4>2.4 new[]\u4e0edelete[]\u5fc5\u987b\u914d\u5bf9\u4f7f\u7528<\/h4>\n<ul>\n<li>\n<p>new[]\u5206\u914d\u7684\u5185\u5b58\u5e03\u5c40\u4e2d\u53ef\u80fd\u5728\u5bf9\u8c61\u6570\u7ec4\u524d\u6709\u4e00\u4e2a\u201c\u6570\u91cf\u201d\u5b57\u6bb5&#xff0c;\u82e5\u7528delete\u91ca\u653e&#xff0c;\u4f1a\u5bfc\u81f4&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u53ea\u8c03\u7528\u7b2c\u4e00\u4e2a\u5143\u7d20\u7684\u6790\u6784\u51fd\u6570&#xff0c;\u5176\u4ed6\u5143\u7d20\u672a\u6790\u6784&#xff08;\u8d44\u6e90\u6cc4\u6f0f&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u91ca\u653e\u7684\u6307\u9488\u4e0d\u662f\u539f\u59cb\u5206\u914d\u5730\u5740&#xff0c;\u5bfc\u81f4\u5185\u5b58\u91ca\u653e\u9519\u8bef\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u53cd\u4e4b&#xff0c;new\u5206\u914d\u7684\u5bf9\u8c61\u7528delete[]\u91ca\u653e&#xff0c;\u4e5f\u4f1a\u5bfc\u81f4\u672a\u5b9a\u4e49\u884c\u4e3a\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u793a\u4f8b&#xff1a;<\/p>\n<p>int* p &#061; new int[10];<br \/>\ndelete p;    \/\/ \u9519\u8bef&#xff01;\u5e94\u8be5\u7528 delete[] p<\/p>\n<p>MyClass* q &#061; new MyClass;<br \/>\ndelete[] q;  \/\/ \u9519\u8bef&#xff01;\u5e94\u8be5\u7528 delete q<\/p>\n<h3>3. new\/delete\u4e0emalloc\/free\u7684\u533a\u522b<\/h3>\n<table>\n<tr>\u7279\u6027new\/deletemalloc\/free<\/tr>\n<tbody>\n<tr>\n<td>\u5c5e\u6027<\/td>\n<td>C&#043;&#043;\u64cd\u4f5c\u7b26<\/td>\n<td>C\/C&#043;&#043;\u6807\u51c6\u5e93\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u662f\u5426\u9700\u8981\u5934\u6587\u4ef6<\/td>\n<td>\u4e0d\u9700\u8981<\/td>\n<td>\u9700\u8981&lt;cstdlib&gt;\u6216&lt;malloc.h&gt;<\/td>\n<\/tr>\n<tr>\n<td>\u8fd4\u56de\u7c7b\u578b<\/td>\n<td>\u7c7b\u578b\u4e25\u683c\u5339\u914d\u7684\u6307\u9488<\/td>\n<td>void*&#xff0c;\u9700\u5f3a\u5236\u8f6c\u6362<\/td>\n<\/tr>\n<tr>\n<td>\u5206\u914d\u5931\u8d25<\/td>\n<td>\u629b\u51fastd::bad_alloc\u5f02\u5e38<\/td>\n<td>\u8fd4\u56deNULL<\/td>\n<\/tr>\n<tr>\n<td>\u6784\u9020\u51fd\u6570\/\u6790\u6784\u51fd\u6570<\/td>\n<td>\u81ea\u52a8\u8c03\u7528<\/td>\n<td>\u4e0d\u8c03\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u5927\u5c0f\u8ba1\u7b97<\/td>\n<td>\u7531\u7f16\u8bd1\u5668\u6839\u636e\u7c7b\u578b\u8ba1\u7b97<\/td>\n<td>\u9700\u624b\u52a8\u6307\u5b9a\u5b57\u8282\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u91cd\u8f7d<\/td>\n<td>\u53ef\u4ee5\u91cd\u8f7doperator new<\/td>\n<td>\u4e0d\u53ef\u91cd\u8f7d<\/td>\n<\/tr>\n<tr>\n<td>\u6570\u7ec4\u652f\u6301<\/td>\n<td>new[]\u81ea\u52a8\u8bb0\u5f55\u5143\u7d20\u4e2a\u6570<\/td>\n<td>\u9700\u81ea\u884c\u8bb0\u5f55<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u793a\u4f8b&#xff1a;<\/p>\n<p>\/\/ malloc\/free<br \/>\nint* p &#061; (int*)malloc(sizeof(int) * 10);<br \/>\nif (p &#061;&#061; nullptr) { \/* \u5904\u7406\u5931\u8d25 *\/ }<br \/>\nfree(p);<\/p>\n<p>\/\/ new\/delete<br \/>\nint* q &#061; new int[10];<br \/>\n\/\/ \u82e5\u5931\u8d25\u629b\u51fa\u5f02\u5e38&#xff0c;\u53ef\u7528try-catch\u6216nothrow\u7248\u672c<br \/>\ndelete[] q;<\/p>\n<h3>4. \u5e38\u89c1\u5185\u5b58\u95ee\u9898\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h3>\n<h4>4.1 \u5185\u5b58\u6cc4\u6f0f<\/h4>\n<p>\u5206\u914d\u540e\u5fd8\u8bb0\u91ca\u653e&#xff0c;\u5c24\u5176\u662f\u5f02\u5e38\u8def\u5f84\u3002<br \/>\n\u89e3\u51b3&#xff1a;\u4f7f\u7528\u667a\u80fd\u6307\u9488&#xff08;std::unique_ptr\u3001std::shared_ptr&#xff09;\u3001RAII\u3001\u5bb9\u5668&#xff08;std::vector&#xff09;\u4ee3\u66ff\u88f8\u6307\u9488\u3002<\/p>\n<h4>4.2 \u91ce\u6307\u9488<\/h4>\n<p>\u6307\u9488\u6307\u5411\u5df2\u91ca\u653e\u7684\u5185\u5b58\u6216\u975e\u6cd5\u5730\u5740\u3002<br \/>\n\u89e3\u51b3&#xff1a;\u91ca\u653e\u540e\u7f6enullptr&#xff0c;\u907f\u514d\u91cd\u590d\u91ca\u653e&#xff1b;\u521d\u59cb\u5316\u6307\u9488\u4e3anullptr\u3002<\/p>\n<h4>4.3 \u91cd\u590d\u91ca\u653e&#xff08;double free&#xff09;<\/h4>\n<p>\u540c\u4e00\u5730\u5740\u91ca\u653e\u4e24\u6b21&#xff0c;\u5bfc\u81f4\u5806\u635f\u574f\u3002<br \/>\n\u89e3\u51b3&#xff1a;\u9075\u5faa\u8c01\u5206\u914d\u8c01\u91ca\u653e\u539f\u5219&#xff0c;\u4f7f\u7528\u667a\u80fd\u6307\u9488\u81ea\u52a8\u7ba1\u7406\u3002<\/p>\n<h4>4.4 \u5185\u5b58\u8d8a\u754c<\/h4>\n<p>\u8bbf\u95ee\u6570\u7ec4\u8fb9\u754c\u4e4b\u5916\u3002<br \/>\n\u89e3\u51b3&#xff1a;\u4f7f\u7528std::array\u3001std::vector&#xff0c;\u6216\u8005\u624b\u52a8\u68c0\u67e5\u8fb9\u754c\u3002<\/p>\n<h4>4.5 \u6df7\u7528new[]\u4e0edelete<\/h4>\n<p>\u89e3\u51b3&#xff1a;\u4e25\u683c\u914d\u5bf9\u4f7f\u7528&#xff0c;\u7528std::vector\u7ba1\u7406\u52a8\u6001\u6570\u7ec4\u3002<\/p>\n<h4>4.6 \u6700\u4f73\u5b9e\u8df5\u5efa\u8bae<\/h4>\n<ul>\n<li>\n<p>\u4f18\u5148\u4f7f\u7528STL\u5bb9\u5668\u548c\u667a\u80fd\u6307\u9488&#xff0c;\u51cf\u5c11\u624b\u52a8\u5185\u5b58\u7ba1\u7406\u3002<\/p>\n<\/li>\n<li>\n<p>\u82e5\u5fc5\u987b\u624b\u52a8\u7ba1\u7406&#xff0c;\u9075\u5faa\u201c\u5728\u6784\u9020\u51fd\u6570\u4e2d\u5206\u914d&#xff0c;\u5728\u6790\u6784\u51fd\u6570\u4e2d\u91ca\u653e\u201d\u7684RAII\u539f\u5219\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e3a\u81ea\u5b9a\u4e49\u7c7b\u91cd\u8f7doperator new\/delete\u65f6&#xff0c;\u540c\u65f6\u91cd\u8f7dnew[]\/delete[]\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528nothrow\u7248\u672c\u7684new\u4ee5\u907f\u514d\u5f02\u5e38&#xff0c;\u6216\u8005\u7528try-catch\u5904\u7406bad_alloc\u3002<\/p>\n<\/li>\n<\/ul>\n<p>#include &lt;new&gt;<br \/>\nint* p &#061; new (std::nothrow) int[100];<br \/>\nif (p &#061;&#061; nullptr) {<br \/>\n    \/\/ \u5904\u7406\u5206\u914d\u5931\u8d25<br \/>\n}<\/p>\n<h3>5. \u603b\u7ed3<\/h3>\n<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86C&#043;&#043;\u7684\u5185\u5b58\u5206\u533a\u6a21\u578b&#xff0c;\u5305\u62ec\u4ee3\u7801\u533a\u3001\u5168\u5c40\/\u9759\u6001\u533a\u3001\u6808\u533a\u3001\u5806\u533a\u548c\u5e38\u91cf\u533a&#xff0c;\u5e76\u6df1\u5165\u5206\u6790\u4e86new\/delete\u7684\u5de5\u4f5c\u673a\u5236\u3002\u7406\u89e3\u8fd9\u4e9b\u5e95\u5c42\u539f\u7406\u6709\u52a9\u4e8e&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5b9a\u4f4d\u548c\u907f\u514d\u5185\u5b58\u9519\u8bef<\/p>\n<\/li>\n<li>\n<p>\u4f18\u5316\u7a0b\u5e8f\u6027\u80fd&#xff08;\u5982\u51cf\u5c11\u5806\u5206\u914d&#xff0c;\u4f7f\u7528\u6808&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u6b63\u786e\u5b9e\u73b0\u81ea\u5b9a\u4e49\u5185\u5b58\u7ba1\u7406<\/p>\n<\/li>\n<li>\n<p>\u5199\u51fa\u66f4\u5b89\u5168\u3001\u66f4\u9ad8\u6548\u7684C&#043;&#043;\u4ee3\u7801<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. C\u5185\u5b58\u5206\u533a\u6a21\u578bC\u7a0b\u5e8f\u8fd0\u884c\u65f6&#xff0c;\u5185\u5b58\u901a\u5e38\u88ab\u5212\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u533a\u57df&#xff1a;\u5206\u533a\u5b58\u653e\u5185\u5bb9\u751f\u547d\u5468\u671f\u7ba1\u7406\u65b9\u5f0f\u4ee3\u7801\u533a\u7f16\u8bd1\u540e\u7684\u4e8c\u8fdb\u5236\u4ee3\u7801&#xff08;\u51fd\u6570\u4f53\u3001\u53ea\u8bfb\u5e38\u91cf&#xff09;\u7a0b\u5e8f\u8fd0\u884c\u671f\u64cd\u4f5c\u7cfb\u7edf\u7ba1\u7406\u5168\u5c40\/\u9759\u6001\u5b58\u50a8\u533a\u5168\u5c40\u53d8\u91cf\u3001\u9759\u6001\u53d8\u91cf\u3001\u5e38\u91cf&#xff08;const\u5168\u5c40&#xff09;\u7a0b\u5e8f\u8fd0\u884c\u671f\u7f16\u8bd1\u65f6\u5206\u914d&#xff0c;\u81ea\u52a8\u91ca\u653e\u6808\u533a\u5c40\u90e8\u53d8\u91cf\u3001\u51fd\u6570\u53c2\u6570\u3001\u8fd4\u56de\u5730\u5740\u7b49\u51fd\u6570\u8c03\u7528\u671f\u95f4\u7f16\u8bd1\u5668\u81ea\u52a8\u7ba1\u7406\u5806\u533a\u52a8\u6001\u5206\u914d\u7684\u5185\u5b58&#xff08;new\/malloc&#xff09;\u7531\u7a0b\u5e8f<\/p>\n","protected":false},"author":2,"featured_media":100086,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,426,427],"topic":[],"class_list":["post-100087","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java","tag-jvm","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5185\u5b58\u5206\u533a\u4e0enew - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/100087.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5185\u5b58\u5206\u533a\u4e0enew - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"1. C\u5185\u5b58\u5206\u533a\u6a21\u578bC\u7a0b\u5e8f\u8fd0\u884c\u65f6&#xff0c;\u5185\u5b58\u901a\u5e38\u88ab\u5212\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u533a\u57df&#xff1a;\u5206\u533a\u5b58\u653e\u5185\u5bb9\u751f\u547d\u5468\u671f\u7ba1\u7406\u65b9\u5f0f\u4ee3\u7801\u533a\u7f16\u8bd1\u540e\u7684\u4e8c\u8fdb\u5236\u4ee3\u7801&#xff08;\u51fd\u6570\u4f53\u3001\u53ea\u8bfb\u5e38\u91cf&#xff09;\u7a0b\u5e8f\u8fd0\u884c\u671f\u64cd\u4f5c\u7cfb\u7edf\u7ba1\u7406\u5168\u5c40\/\u9759\u6001\u5b58\u50a8\u533a\u5168\u5c40\u53d8\u91cf\u3001\u9759\u6001\u53d8\u91cf\u3001\u5e38\u91cf&#xff08;const\u5168\u5c40&#xff09;\u7a0b\u5e8f\u8fd0\u884c\u671f\u7f16\u8bd1\u65f6\u5206\u914d&#xff0c;\u81ea\u52a8\u91ca\u653e\u6808\u533a\u5c40\u90e8\u53d8\u91cf\u3001\u51fd\u6570\u53c2\u6570\u3001\u8fd4\u56de\u5730\u5740\u7b49\u51fd\u6570\u8c03\u7528\u671f\u95f4\u7f16\u8bd1\u5668\u81ea\u52a8\u7ba1\u7406\u5806\u533a\u52a8\u6001\u5206\u914d\u7684\u5185\u5b58&#xff08;new\/malloc&#xff09;\u7531\u7a0b\u5e8f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/100087.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-03T14:01:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260903140101-6a997d9d871e9.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/100087.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/100087.html\",\"name\":\"\u5185\u5b58\u5206\u533a\u4e0enew - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-03T14:01:02+00:00\",\"dateModified\":\"2026-09-03T14:01:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/100087.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/100087.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/100087.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5185\u5b58\u5206\u533a\u4e0enew\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5185\u5b58\u5206\u533a\u4e0enew - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/100087.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5185\u5b58\u5206\u533a\u4e0enew - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"1. C\u5185\u5b58\u5206\u533a\u6a21\u578bC\u7a0b\u5e8f\u8fd0\u884c\u65f6&#xff0c;\u5185\u5b58\u901a\u5e38\u88ab\u5212\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u533a\u57df&#xff1a;\u5206\u533a\u5b58\u653e\u5185\u5bb9\u751f\u547d\u5468\u671f\u7ba1\u7406\u65b9\u5f0f\u4ee3\u7801\u533a\u7f16\u8bd1\u540e\u7684\u4e8c\u8fdb\u5236\u4ee3\u7801&#xff08;\u51fd\u6570\u4f53\u3001\u53ea\u8bfb\u5e38\u91cf&#xff09;\u7a0b\u5e8f\u8fd0\u884c\u671f\u64cd\u4f5c\u7cfb\u7edf\u7ba1\u7406\u5168\u5c40\/\u9759\u6001\u5b58\u50a8\u533a\u5168\u5c40\u53d8\u91cf\u3001\u9759\u6001\u53d8\u91cf\u3001\u5e38\u91cf&#xff08;const\u5168\u5c40&#xff09;\u7a0b\u5e8f\u8fd0\u884c\u671f\u7f16\u8bd1\u65f6\u5206\u914d&#xff0c;\u81ea\u52a8\u91ca\u653e\u6808\u533a\u5c40\u90e8\u53d8\u91cf\u3001\u51fd\u6570\u53c2\u6570\u3001\u8fd4\u56de\u5730\u5740\u7b49\u51fd\u6570\u8c03\u7528\u671f\u95f4\u7f16\u8bd1\u5668\u81ea\u52a8\u7ba1\u7406\u5806\u533a\u52a8\u6001\u5206\u914d\u7684\u5185\u5b58&#xff08;new\/malloc&#xff09;\u7531\u7a0b\u5e8f","og_url":"https:\/\/www.wsisp.com\/helps\/100087.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-03T14:01:02+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260903140101-6a997d9d871e9.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/100087.html","url":"https:\/\/www.wsisp.com\/helps\/100087.html","name":"\u5185\u5b58\u5206\u533a\u4e0enew - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-03T14:01:02+00:00","dateModified":"2026-09-03T14:01:02+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/100087.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/100087.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/100087.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5185\u5b58\u5206\u533a\u4e0enew"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/100087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=100087"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/100087\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/100086"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=100087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=100087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=100087"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=100087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}