【GUIライブラリ】wxWindowsでのひょーん at TECH
[2ch|▼Menu]
69:65
03/05/21 22:21
後半にょ。

> If you decide to allocate a C++ array of objects (such as wxBitmap)
that may be cleaned up by wxWindows, make sure you delete the array explicitly
before wxWindows has a chance to do so on exit, since calling delete on array
members will cause memory problems.
wxWindowsがあぼーんするかもしんないオブジェクト(wxBitmapとかな)のC++ の配列
(STLのarrayのことか?)をC++でアロケートするんなら、終了時にwxWindows がそうする
前に、絶対、その配列を明示的にあぼんすれ。配列のメンバについてdelete を呼ぶと
メモリの問題が発生するからな。

> wxColour can be created statically: it is not automatically cleaned up
and is unlikely to be shared between other objects; it is lightweight enough
for copies to be made.
wxColourは静的に作成できまつ。自動的に削除されず、オブジェクト間で共有されるこ
ともあんまないでつ。十分軽いのでコピー作ってもおkでつ。

> Beware of deleting objects such as a wxPen or wxBitmap if they are
still in use. Windows is particularly sensitive to this: so make sure you make
calls like wxDC::SetPen(wxNullPen) or wxDC::SelectObject(wxNullBitmap) before
deleting a drawing object that may be in use. Code that doesn't do this will
probably work fine on some platforms, and then fail under Windows.
wxPenやwxBitmapといったオブジェクトを削除する際は、それらがまだ使用中でないか
気を付けよ。Windowsはこの点にたいへんウルサイ。であるから、使用中かも知れない
オブジェクトを削除する前には、必ず、確実にwxDC::SetPen(wxNullPen) もしくは
wxDC::SelectObject(wxNullBitmap)を呼ぶようにせよ。これを怠ったコードはいくつか
のプラットフォームではちゃんと動くだろうが、Windowsではダメなんである。

文体バラバラや。推敲して下さい。
あと、見直して気付いたんですが>>65の「指定」は「仕様」かも知れませぬ。
長くてスマソ >皆様。



次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5132日前に更新/338 KB
担当:undef