memory-safety-patterns
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMemory Safety Patterns
内存安全模式
Cross-language patterns for memory-safe programming including RAII, ownership, smart pointers, and resource management.
适用于内存安全编程的跨语言模式,涵盖RAII、所有权、智能指针及资源管理相关内容。
Use this skill when
适用场景
- Writing memory-safe systems code
- Managing resources (files, sockets, memory)
- Preventing use-after-free and leaks
- Implementing RAII patterns
- Choosing between languages for safety
- Debugging memory issues
- 编写内存安全的系统代码
- 管理各类资源(文件、套接字、内存)
- 防范释放后使用问题与资源泄漏
- 实现RAII模式
- 基于安全性需求进行编程语言选型
- 调试内存相关问题
Do not use this skill when
不适用场景
- The task is unrelated to memory safety patterns
- You need a different domain or tool outside this scope
- 任务与内存安全模式无关
- 需要使用本范畴外的其他领域知识或工具
Instructions
使用说明
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open .
resources/implementation-playbook.md
- 明确目标、约束条件及所需输入。
- 应用相关最佳实践并验证产出结果。
- 提供可落地的操作步骤与验证方法。
- 若需要详细示例,请打开。
resources/implementation-playbook.md
Resources
相关资源
- for detailed patterns and examples.
resources/implementation-playbook.md
- 查看获取详细的模式说明与示例。
resources/implementation-playbook.md