Issues with Web Browser Component (Kiosk mode + Memory leak)


Two questions:

1-I seem to be leaking memory with just the following code change to a fresh GUI app. 



    webBrowser = new WebBrowserComponent(false);


    setSize (600, 400);


webBrowser is a ScopedPointer, btw. This gives me a memory leak when I close the app unless I comment out the addAndMakeVisible.


2-When I try going into kiosk mode with the WebBrowserComponent added and made visible, I get a black screen. Here is what I tried. What am I doing wrong?

    void initialise (const String& commandLine) override


        // This method is where you should put your application's initialisation code..

        mainWindow = new MainWindow (getApplicationName());

        Desktop::getInstance().setKioskModeComponent(mainWindow->getTopLevelComponent(), true);



What object is actually being leaked?


I'm not really sure how to figure out what object(s) it's reporting on. Here is the output I'm seeing

JUCE v3.1.1

First-chance exception at 0x75352F71 (KernelBase.dll) in testapp.exe: 0x000006BA: The RPC server is unavailable.

Detected memory leaks!

Dumping objects ->

{381} normal block at 0x00A5E4F8, 12 bytes long.

 Data: < f          > CC 66 C3 01 01 00 00 00 F0 02 08 00 

{380} normal block at 0x00A5E4A8, 16 bytes long.

 Data: < g              > C8 67 C3 01 01 00 00 00 F0 02 08 00 F8 E4 A5 00 

{379} normal block at 0x00A52C58, 12 bytes long.

 Data: < h          > 84 68 C3 01 01 00 00 00 A8 E4 A5 00 

Object dump complete.

The program '[680] testapp.exe' has exited with code 0 (0x0).


Full screen issue resolved -

Taking a hint from, I disabled the native title bar (comment out setUsingNativeTitleBar) and now full screen with Web Browser Component works fine.

Now to figure out what's with the memory leak...


The memory leak looks like a false alarm to me. If it was a juce object then you'd get a dump from LeakedObjectDetector, so since it's just a handful of bytes, it's probably just some tiny bit of memory that the web browser itself is leaking.