BitmapData.disposeじゃなくって、その中身だけ消すようなメソッドはないんかしら?
BitmapData.disposeやっちゃうと、もう一度BitmapData定義しないといけないっちゃ。これはやりたくないんだけどなぁ・・・。まぁ別に切り分けてしまえばいいんだけど。
BitmapData.disposeじゃなくって、その中身だけ消すようなメソッドはないんかしら?
BitmapData.disposeやっちゃうと、もう一度BitmapData定義しないといけないっちゃ。これはやりたくないんだけどなぁ・・・。まぁ別に切り分けてしまえばいいんだけど。
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
These cookies are needed for adding comments on this website.
Google reCAPTCHA helps protect websites from spam and abuse by verifying user interactions through challenges.
Google Tag Manager simplifies the management of marketing tags on your website without code changes.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
Marketing cookies are used to follow visitors to websites. The intention is to show ads that are relevant and engaging to the individual user.
A video-sharing platform for users to upload, view, and share videos across various genres and topics.
Service URL: www.youtube.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy policy.
「BitmapDataの解放」への3件の返信
あ、でもどっちにしてもメモリがパンクしちゃうんでdisposeしないといけないんですけどね。
同じ名前でもメモリ上は上書きされないんだっけな?だいぶ前に検証したんだけど忘れた(;´Д`)
あれ?ちがったっけな?
よくわからんくなってきたw
思い出した。
function内部で使ったときにローカル変数で定義するとメモリの中にどんどん溜まっていくんだった。なのでこの辺ちと腑に落ちないぶぶんなのだけど、
bt.onRelease = function() {
var output = new flash.display.BitmapData(w, h, true, 0x00);
var oClip = this.createEmptyMovieClip(“oClip”, 0);
oClip.attachBitmap(output, 0);
output.draw(img);
};
とかする場合、output の定義の前に
output.dispose();
を入れてやれば大丈夫。全然ローカル変数じゃないんだけど・・
この辺なんかしっくりこないな。