I am going to reply to myself because the problems was not Motools or
the way I wrote my code, the problem was with socket.io .. and https ,
I've updated to version 0.9.14 and that fixed the leak...

I like to put this as reference for people using Motools Serverside
and socket.io ...

socket.io reference link https://github.com/LearnBoost/socket.io/issues/1015

Regards

On Mar 11, 9:28 am, utan <vcomputado...@gmail.com> wrote:
> Anyone?
>
> On Mar 10, 10:11 pm, utan <vcomputado...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi guys,
>
> > I have node application using socket.io and motools server side,
> > problem is that I seem to be having memory leak and since is server
> > side I'm not really sure..
>
> > When a user connect a new instance of the class is created, see this
> > code bellow:
>
> > // initiate the server
> > require('./node_modules/mootools');
> > var io          =       require('./node_modules/socket.io');
>
> > var Server = new Class({
> >         Implements      :       [process.EventEmitter],
>
> >         initialize: function(port)
> >     {
> >                 this.serverPort         =       port;
> >                 this.server                     =       null;
> >                 // let's connect
> >                 this.connect();
> >         },
> >         connect :       function(){
> >                 // connect to socket io
> >                 this.server     =       io.listen(this.serverPort ,{ log: 
> > false });
>
> >                 client.on('disconnect', function() {
> >                         delete this.server;// doubt should i delete this 
> > object after user
> > has disconnected?
> >                 });
> >         }
>
> > });
>
> > // initiate the server
> > var app = new Server(80);
>
> > My question is , is the class and it's object destroyed when user
> > disconnect or socket in this case, or we should manually destroy the
> > class and or objects.. (I am still in the process of learning more,
> > bear with me).
>
> > Should I delete this object on disconnect like so : delete
> > this.server;
>
> > How is the class and objects taking care in server side with motools?
>
> > Appreciate your help.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mootools-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to