{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/uwa-answer-release-unity-memory-on-exit/",
  "atlas": "https://www.pystone.net/?node=uwa-answer-release-unity-memory-on-exit#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/uwa-answer-release-unity-memory-on-exit.md",
  "context": "https://www.pystone.net/notes/uwa-answer-release-unity-memory-on-exit.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:uwa-answer-release-unity-memory-on-exit",
  "slug": "uwa-answer-release-unity-memory-on-exit",
  "title": "Unity内存如何在退出时释放",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "石心.Yong"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "Unity内存如何在退出时释放",
  "contentRole": "source",
  "sourceType": "source",
  "sourceMetadata": {
    "author": "石心.Yong"
  },
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "external_source",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "cd98b06e23e065a71ce6940ee42cfa245fbb9f4f4007da424a1c6978ab3cd9c1",
  "assets": [],
  "headings": [
    {
      "depth": 1,
      "text": "Unity内存如何在退出时释放",
      "anchor": "unity内存如何在退出时释放",
      "citation": "https://www.pystone.net/notes/uwa-answer-release-unity-memory-on-exit/#unity%E5%86%85%E5%AD%98%E5%A6%82%E4%BD%95%E5%9C%A8%E9%80%80%E5%87%BA%E6%97%B6%E9%87%8A%E6%94%BE"
    },
    {
      "depth": 2,
      "text": "问题",
      "anchor": "问题",
      "citation": "https://www.pystone.net/notes/uwa-answer-release-unity-memory-on-exit/#%E9%97%AE%E9%A2%98"
    },
    {
      "depth": 2,
      "text": "我的回答",
      "anchor": "我的回答",
      "citation": "https://www.pystone.net/notes/uwa-answer-release-unity-memory-on-exit/#%E6%88%91%E7%9A%84%E5%9B%9E%E7%AD%94"
    },
    {
      "depth": 2,
      "text": "来源与关系",
      "anchor": "来源与关系",
      "citation": "https://www.pystone.net/notes/uwa-answer-release-unity-memory-on-exit/#%E6%9D%A5%E6%BA%90%E4%B8%8E%E5%85%B3%E7%B3%BB"
    }
  ],
  "claims": [],
  "outgoing": [
    {
      "id": "note:my-uwa-answers",
      "title": "我的 UWA 问答",
      "url": "https://www.pystone.net/notes/my-uwa-answers/",
      "atlas": "https://www.pystone.net/?node=my-uwa-answers#knowledge-atlas",
      "label": "我的 UWA 问答",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "上位集合：我的 UWA 问答",
      "citation": "https://www.pystone.net/notes/uwa-answer-release-unity-memory-on-exit/#%E6%9D%A5%E6%BA%90%E4%B8%8E%E5%85%B3%E7%B3%BB"
    }
  ],
  "incoming": [
    {
      "id": "note:my-uwa-answers",
      "title": "我的 UWA 问答",
      "url": "https://www.pystone.net/notes/my-uwa-answers/",
      "atlas": "https://www.pystone.net/?node=my-uwa-answers#knowledge-atlas",
      "label": "我的 UWA 问答",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "2021-03-17：Unity内存如何在退出时释放（终端平台）",
      "citation": "https://www.pystone.net/notes/my-uwa-answers/#2021"
    },
    {
      "id": "note:game-graphics-and-runtime",
      "title": "游戏图形与运行时",
      "url": "https://www.pystone.net/notes/game-graphics-and-runtime/",
      "atlas": "https://www.pystone.net/?node=game-graphics-and-runtime#knowledge-atlas",
      "label": "游戏图形与运行时",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "我的UWA问答中的“2021-03-17 - Unity内存如何在退出时释放”导航项",
      "citation": "https://www.pystone.net/notes/game-graphics-and-runtime/#%E6%88%91%E7%9A%84uwa%E9%97%AE%E7%AD%94"
    }
  ],
  "contentMarkdown": "# Unity内存如何在退出时释放\n\n> [!note] 我的 UWA 问答\n> 本文收录我在 UWA 问答发表的公开回答。问题内容归原提问者；回答保留当时语境，技术结论可能受 Unity 版本、平台和项目条件限制。\n\n## 问题\n\n我用unity做了一个功能封装成SDK提供给APP使用。第一次从native app里进入到Unity的功能后，unity的开销使内存上涨。这个正常。从unity功能里退出到native app里unity里的内存并没有释放出来。。还显示着占用。不知道有什么方法可以把这部分内存释放出来吗？\n\n- 提问者：胡玉\n- 提问时间：2021-03-17 01:29:25\n\n## 我的回答\n\n这样是不是可行：在C#层写个函数，调用Unity卸载资源、释放内存的接口。从Unity的功能里退出到native app时，调用一下这个C#层的卸载函数。\n\n- 回答时间：2021-03-17 20:06:01\n- 最后更新：2021-03-17 20:41:46\n- 采纳状态：未采纳\n\n## 来源与关系\n\n- 上位集合：[[10-计算机、信息技术与工程/05-游戏图形与运行时/我的UWA问答/我的UWA问答|我的 UWA 问答]]\n- UWA 标签：终端平台\n- 原始问题：[Unity内存如何在退出时释放](https://answer.uwa4d.com/question/60507a75cfa35d5b53669b09)\n- 源页最后更新：2021-03-17 23:27:09\n"
}
