comparison runtime/internal/lifetime.d @ 912:16264a3973bf

_d_delarray also had one of the array consistency asserts mentioned in #184 and dmd2632.
author Christian Kamm <kamm incasoftware de>
date Fri, 30 Jan 2009 07:51:50 +0100
parents 4c02b41b3dc6
children c4c6e5e9c23e
comparison
equal deleted inserted replaced
911:1d9fe5e2a13c 912:16264a3973bf
502 */ 502 */
503 extern (C) void _d_delarray(size_t plength, void* pdata) 503 extern (C) void _d_delarray(size_t plength, void* pdata)
504 { 504 {
505 // if (p) 505 // if (p)
506 // { 506 // {
507 assert(!plength || pdata); 507 // This assert on array consistency may fail with casts or in unions.
508 // This function still does something sensible even if plength && !pdata.
509 // assert(!plength || pdata);
508 510
509 if (pdata) 511 if (pdata)
510 gc_free(pdata); 512 gc_free(pdata);
511 // p.data = null; 513 // p.data = null;
512 // p.length = 0; 514 // p.length = 0;