Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: PienueDut

26. May 2012, 08:01:00 am
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)DaeLoader
Pages: [1]
Print
Author Topic: DaeLoader  (Read 781 times)
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« on: 03. August 2008, 09:57:27 pm »

I was looking through the DaeLoader and saw the InputStreams getting created in there.  Where are those streams supposed to be getting closed?

example:
Code:
public DaeModel loadModel( URL url, String skin ) throws IOException, IncorrectFormatException, ParsingErrorException
    {
        boolean baseURLWasNull = setBaseURLFromModelURL( url );
       
        DaeModel model = loadModel( url.openStream(), skin );
       
        if ( baseURLWasNull )
        {
            popBaseURL();
        }
       
        return( model );
    }

The function that stream is passed into never closes it, and it doesn't get closed by the parser in jagatoo.  Should they be getting closed in Jagatoo after the parsing is done?

Marvin, you mentioned that the ModelLoader code is getting re-worked, is this being fixed as part of that?  I don't know if this is an issue for other loaders, I only looked at the collada loader.

qb
Logged

Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 03. August 2008, 10:15:14 pm »

I saw this in some other loaders, too. I would say, the xith.part of the loader should make sure, the stream is closed. And the JAGaToo-part should also close the stream. I'm not sure, how the final architecture will look like exactly. So this is the safe way Wink.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic