次のコードが与えられます:
imagecopyresized($new_image, $product, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height);
imagedestroy($product);
$product = $new_image;
imagedestroy($new_image);
最後の行は、のある種のポインタであるかのように、$product
だけ$new_image
でなく、を破棄します。なぜこれが発生し、$product内に*$ new_image *のコピーを効果的に作成してから、リソースを破棄するにはどうすればよいですか?$product
$new_image
$new_image