mirror of
https://github.com/fltk/fltk.git
synced 2026-06-08 01:46:00 +08:00
Fl::set_fonts() under Mac OS: added missing delete statement.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8451 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -83,7 +83,7 @@ if(fl_mac_os_version >= 0x1050) {
|
||||
CFRelease(fcref);
|
||||
CFIndex count = CFArrayGetCount(arrayref);
|
||||
CFIndex i;
|
||||
char **tabfontnames = new char*[count]; // never free'ed
|
||||
char **tabfontnames = new char*[count];
|
||||
for (i = 0; i < count; i++) {
|
||||
CTFontDescriptorRef fdesc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(arrayref, i);
|
||||
CTFontRef font = CTFontCreateWithFontDescriptor(fdesc, 0., NULL);
|
||||
@@ -99,6 +99,7 @@ if(fl_mac_os_version >= 0x1050) {
|
||||
for (i = 0; i < count; i++) {
|
||||
Fl::set_font((Fl_Font)(fl_free_font++), tabfontnames[i]);
|
||||
}
|
||||
delete[] tabfontnames;
|
||||
return (Fl_Font)fl_free_font;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user