当前位置:网站首页>D damage and safety
D damage and safety
2022-06-22 14:26:00 【fqbqrr】
original text
because use contain destroy, So it can't be for Security
R use(R, T)(T obj, R delegate(T) fT)
{
scope (exit)
destroy!false(obj);
return fT(obj);
}
How to ensure Security call destroy?
Just call its Destructor yes @safe Of ,destroy It should be Security Of .
If Destructor yes @system, be Security The only way to invoke the code is :(1) Make sure No violation Memory safe call Destructor Conditions ,(2)( use Compile time and / Or runtime Check ) Make sure these conditions are met ,(3) stay @trusted Function destroy.
use Derived as System , Closures are also not marked Security .
Mark use by Security , Let's see what they said .
Yes class , At present dmd+druntime Cannot statically decide Destructor whether Security .
边栏推荐
- Summary of patent blog writing
- Messiari annual report-2021
- 论文专利博客写作总结
- 想知道股票开户优惠链接,如何得知?网上开户安全么?
- SQL Server 常用函数
- 华为这份关于专利的会议纪要,都说了什么?(内含华为十大发明彩蛋)
- History of hash index design
- 线下实体店结合VR全景,让虚拟购物更加真实
- If you want to know the stock account opening discount link, how do you know? Is it safe to open an account online?
- How to implement interface exception scenario testing? Exploration of test methods and implementation of test tools
猜你喜欢

作为程序员,职业规划需要注意的四个阶段

一文搞懂开放源码软件(OSS)质量保证

Flink状态管理

安装和使用protobuf-c

Neuron+eKuiper 实现工业物联网数据采集、清理与反控

Database employment consulting system for your help

看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-5

Go Web 编程入门:验证器

程序员要不要选择软件人才外包公司?

Fluentd is easy to get started. Combined with the rainbow plug-in market, log collection is faster
随机推荐
一文搞懂开放源码软件(OSS)质量保证
C# Winform 相册功能,图片缩放,拖拽,预览图分页
LDA study notes
Seven cattle cloud upload picture
程序员要不要选择软件人才外包公司?
散户开户哪个证券公司好?手机开户安全么?
What is bout?
史蒂芬·柯维写给年轻人的高效工作秘笈
Installing and using protobuf-c
unity和C#中怎么去比较2个日期大小
How do I open an account on my mobile phone? Is it safe to open an account online?
Cosmos、Polkadot
ThoughtWorks. QRcode and zxing Net QR code, URL can be directly jumped
数据库 就业咨询系统求各位帮下忙
d安全可以调用系统
Summary of patent blog writing
What is the difference between Z-score and deltf/f?
Database employment consulting system for your help
软件项目验收测试范围和流程,这些你都知道吗?
Tianrun cloud is about to be listed: VC tycoon Tian Suning significantly reduces his holdings and is expected to cash out HK $260million