Tornado 6.5 Documentation
Python is required. Examples in the Tornado documentation will generally use the native form. Translation between the two forms is generally straightforward: # Decorated: # Native: # Normal function request.body. By default uploaded files are fully buffered in memory; if you need to handle files that are too large to comfortably keep in memory see the stream_request_body class decorator. In the demos Locale.translate method. Templates also have the global function call _() available for string translation. The translate function has two forms: _("Translate this string") which translates the string0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
Python is required. Examples in the Tornado documentation will generally use the native form. Translation between the two forms is generally straightforward: # Decorated: # Native: request.body. By default uploaded files are fully buffered in memory; if you need to handle files that are too large to comfortably keep in memory see the stream_request_body class decorator.In the demos directory Locale.translate method. Templates also have the global function call _() available for string translation. The translate function has two forms: _("Translate this string") which translates the string0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
the stack)。栈中的所有数据都必须 占用已知且固定的大小。在编译时大小未知或大小可能变化的数据,要改为存储在堆 上。 堆是缺乏组织的:当向堆放入数据时,你要请求一定大小的空间。内存分配器 (memory allocator)在堆的某处找到一块足够大的空位,把它标记为已使用,并返 回一个表示该位置地址的 指针(pointer)。这个过程称作 在堆上分配内存 (allocating on the heap),有时简称为 且它的大小还可能随着程序运行而改变。 对于 String 类型,为了支持一个可变,可增长的文本片段,需要在堆上分配一块在编译时未 知大小的内存来存放内容。这意味着: • 必须在运行时向内存分配器(memory allocator)请求内存。 • 需要一个当我们处理完 String 时将内存返回给分配器的方法。 第一部分由我们完成:当调用 String::from 时,它的实现 (implementation) 我们会在第十六章讨论 Mutex。 346/562Rust 程序设计语言 简体中文版 引用循环与内存泄漏 Rust 的内存安全性保证使其难以意外地制造永远也不会被清理的内存(被称为 内存泄漏, memory leak),但并非不可能。Rust 并不保证完全防止内存泄漏,这意味着内存泄漏在 Rust 中被认为是内存安全的。这一点可以通过 Rc 和 RefCell 看出 Rust 允许出现内存泄漏: 0 码力 | 562 页 | 3.23 MB | 10 天前3
共 3 条
- 1