cleanup memory for scrollarea
Adds basic format
This commit is contained in:
parent
e0dad876ec
commit
c499645797
@ -23,7 +23,10 @@ Napi::Object QScrollAreaWrap::init(Napi::Env env, Napi::Object exports) {
|
||||
|
||||
NScrollArea* QScrollAreaWrap::getInternalInstance() { return this->instance; }
|
||||
|
||||
QScrollAreaWrap::~QScrollAreaWrap() { extrautils::safeDelete(this->instance); }
|
||||
QScrollAreaWrap::~QScrollAreaWrap() {
|
||||
extrautils::safeDelete(this->instance);
|
||||
YGNodeFree(this->scrollNode);
|
||||
}
|
||||
|
||||
QScrollAreaWrap::QScrollAreaWrap(const Napi::CallbackInfo& info)
|
||||
: Napi::ObjectWrap<QScrollAreaWrap>(info) {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { EventEmitter } from 'events';
|
||||
import { NativeElement, Component, NativeRawPointer } from './Component';
|
||||
import { wrapWithActivateUvLoop } from '../utils/helpers';
|
||||
|
||||
function addDefaultErrorHandler(native: NativeElement, emitter: EventEmitter): void {
|
||||
native.subscribeToQtEvent('error');
|
||||
@ -39,7 +38,7 @@ export abstract class EventWidget<Signals extends {}> extends Component {
|
||||
super();
|
||||
if (native.initNodeEventEmitter) {
|
||||
this.emitter = new EventEmitter();
|
||||
this.emitter.emit = wrapWithActivateUvLoop(this.emitter.emit.bind(this.emitter));
|
||||
this.emitter.emit = this.emitter.emit.bind(this.emitter);
|
||||
native.initNodeEventEmitter(this.emitter.emit);
|
||||
} else {
|
||||
throw new Error('initNodeEventEmitter not implemented on native side');
|
||||
|
||||
@ -41,6 +41,10 @@ module.exports = {
|
||||
label: 'Spectrum',
|
||||
href: 'https://spectrum.chat/nodegui',
|
||||
},
|
||||
{
|
||||
label: 'Slack',
|
||||
href: 'https://nodegui.slack.com',
|
||||
},
|
||||
{
|
||||
label: 'Twitter',
|
||||
to: 'https://twitter.com/node_gui',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user