Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
The function <函数 <<ref_get_null_resource>> returns a global instance of the null resource. This resource offers a simple invariant: all calls to allocate will throw the exception `std::bad_alloc`. An instance of the> 返回一个全局的空资源实例。该资源提供一个简单的不变式:所有内存分配调用都会抛出 `std::bad_alloc` 异常。通过使用空资源实例,可确保解析过程绝不会进行堆内存分配。这一点将在后文进一步详细说明。</ref_get_null_resourcecan be used to make parsing guarantee that allocations from the heap are never made. This is explored in more detail in a later section.>