parent
0f1b923cc9
commit
98bff887f5
@ -40,7 +40,7 @@ namespace images {
|
||||
//% blockId=device_build_image block="create image"
|
||||
//% parts="ledmatrix"
|
||||
Image createImage(ImageLiteral_ leds) {
|
||||
return new RefMImage(imageBytes(leds));
|
||||
return NEW_GC(RefMImage, imageBytes(leds));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -145,7 +145,7 @@ namespace led {
|
||||
//% parts="ledmatrix"
|
||||
Image screenshot() {
|
||||
auto d = uBit.display.screenShot().leakData();
|
||||
auto r = new RefMImage(d);
|
||||
auto r = NEW_GC(RefMImage, d);
|
||||
d->decr();
|
||||
return r;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user