Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在这个例子中
procedure foobar; var tab:array of integer; begin setlength(tab,10); end;
数组被破坏还是内存泄漏?
内存被释放。(也就是说,没有内存泄漏!)
该数组是自动释放的,但我见过一些模糊的情况,由于某种原因它不是。我通过将数组设置为零来解决它。