Ambigous access of ‘delete’ error in juce_URL.cpp in dll mode


#1

When using juce 4.3.1 in Dll mode, i get the following compilation error in FallbackDownloadTask class of juce_URL.cpp :
C2385: ambiguous access of ‘delete’

JUCE_LEAK_DETECTOR was missing in the class declaration.

So, please can you integrate this git-patch:

diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp
index 96e052e..b7ffcd5 100644
--- a/modules/juce_core/network/juce_URL.cpp
+++ b/modules/juce_core/network/juce_URL.cpp
@@ -101,6 +101,9 @@ struct FallbackDownloadTask  : public URL::DownloadTask,
     HeapBlock buffer;
     ScopedPointer stream;
     URL::DownloadTask::Listener* listener;
+
+private:
+	JUCE_LEAK_DETECTOR(FallbackDownloadTask)
 };

void URL::DownloadTask::Listener::progress (DownloadTask*, int64, int64) {}

2.10.0.windows.1


#2

To get around the problem temporarily this is what I did
Add JUCE_LEAK_DETECTOR (FallbackDownloadTask); In the declaration of the file “juce_URL.cpp: 105


#3

Yeah Thanks. It is what i did too (see my proposed patch, in the description).


#4

Thanks, I’ve added this now.


#5

If you can also add this Jules “JUCE_API” thanks :slight_smile:
Class JUCE_API JavascriptEngine -> juce_Javascript.h
Struct JUCE_API NativeFunctionArgs -> juce_Variant.h


#6

Sure, will add those.